-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-28883 Manage hbase-thirdparty transitive dependencies via BOM pom #124
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<!-- | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
ON MVN COMPILE NOT WORKING | ||
|
||
If you wondering why 'mvn compile' does not work building HBase | ||
(in particular, if you are doing it for the first time), instead do | ||
'mvn package'. If you are interested in the full story, see | ||
https://issues.apache.org/jira/browse/HBASE-6795. | ||
|
||
--> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.hbase.thirdparty</groupId> | ||
<artifactId>hbase-thirdparty</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
<artifactId>hbase-thirdparty-bom</artifactId> | ||
<name>Apache HBase Thirdparty - BOM</name> | ||
<description> | ||
Bill of Materials for dependencies common to HBase Thirdparty and HBase main code | ||
</description> | ||
<packaging>pom</packaging> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
<version>${internal.protobuf.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-bom</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Apache9 mentioned in https://github.com/apache/hbase/pull/6295/files#r1775002522, we may not need to bump netty4 as it is for zk/hadoop. Same for error prone. We can decide what all dependencies we would want to keep here. Here's a exhaustive list of dependencies i found relevant. |
||
<version>${netty4.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.errorprone</groupId> | ||
<artifactId>error_prone_annotations</artifactId> | ||
<version>${error_prone_annotations.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this one included? There's no mention of it in the hbase.git/pom There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do have this at https://github.com/apache/hbase/blob/master/pom.xml#L1555 |
||
<version>${servlet-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>${jackson.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>${jackson.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>${jackson.databind.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>flatten-maven-plugin</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the flatten plugin used for the bom? By definition, there should be no dependencies via this pom. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @ndimiduk To preserve the dependencyManagement section in the bom, I had to choose flatten mode: bom. We have flattenMode=oss in parent but for the bom we need to have flattenMode=bom. Hence, I had to add this in order to override the flatten mode defined in parent. Please see https://www.mojohaus.org/flatten-maven-plugin/apidocs/org/codehaus/mojo/flatten/FlattenMode.html |
||
<configuration> | ||
<flattenMode>bom</flattenMode> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>flatten</goal> | ||
</goals> | ||
<phase>process-resources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not have this as per observation in apache/hbase#6366 (comment)
CC: @ndimiduk