HBASE-16712 fix mvn hadoop-3.0 profile for mvn install

- Handles licenses for transitive dependencies introduced by Hadoop 3
- Forces dependency on hadoop  3.0.0-alpha1 instead of 3.0.0-SNAPSHOT
This commit is contained in:
Jonathan M Hsieh 2016-09-26 12:15:35 -07:00
parent 73e9456702
commit 8e100628a4
4 changed files with 250 additions and 3 deletions

View File

@ -1561,7 +1561,9 @@ You can redistribute it and/or modify it under either the terms of the GPL
## Whitelist of licenses that it's safe to not aggregate as above. ## Whitelist of licenses that it's safe to not aggregate as above.
## Note that this doesn't include ALv2 or the aforementioned aggregate ## Note that this doesn't include ALv2 or the aforementioned aggregate
## license mentions. ## license mentions.
#set($non_aggregate_fine = [ 'Public Domain', 'New BSD license', 'BSD license', 'Mozilla Public License Version 2.0' ]) ##
## See this FAQ link for justifications: https://www.apache.org/legal/resolved.html
#set($non_aggregate_fine = [ 'Public Domain', 'New BSD license', 'BSD license', 'Mozilla Public License Version 2.0', 'Creative Commons Attribution License, Version 2.5', 'MPL 1.1'])
## include LICENSE sections for anything not under ASL2.0 ## include LICENSE sections for anything not under ASL2.0
#foreach( ${dep} in ${projects} ) #foreach( ${dep} in ${projects} )
## if there are no licenses we'll fail the build later, so ## if there are no licenses we'll fail the build later, so

View File

@ -272,6 +272,29 @@ JRuby's licence.
#if(${dep.artifactId.equals("jruby-complete")}) #if(${dep.artifactId.equals("jruby-complete")})
#set($jruby=true) #set($jruby=true)
#end #end
#if( ${dep.licenses.isEmpty()} )
ERROR: This product includes ${dep.name} which has no licenses!
Revert the change if invalid or if intentional add license info to supplemental-models.xml
<groupId>${dep.groupId}</groupId>
<artifactId>${dep.artifactId}</artifactId>
<version>${dep.version}</version>
maven central search
g:${dep.groupId} AND a:${dep.artifactId} AND v:${dep.version}
project website
${dep.url}
project source
${dep.scm.url}
## fail the template. If you're looking at the source NOTICE.vm
## file based on a stacktrace or exception message, you need to find
## the generated NOTICE file that has the actual dependency info printed.
${dep.license[0]}
#end
#if( !(${dep.licenses[0].name.contains("BSD")} || ${dep.licenses[0].name.contains("MIT")}) ) #if( !(${dep.licenses[0].name.contains("BSD")} || ${dep.licenses[0].name.contains("MIT")}) )
#if( !(${dep.licenses[0].name.equals("Public Domain")}) ) #if( !(${dep.licenses[0].name.equals("Public Domain")}) )
#if( !(${dep.licenses[0].name.contains("Apache Software License, Version 2.0")}) ) #if( !(${dep.licenses[0].name.contains("Apache Software License, Version 2.0")}) )

View File

@ -643,6 +643,21 @@ under the License.
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.0</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement> <supplement>
<project> <project>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
@ -713,6 +728,21 @@ under the License.
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>2.7.1</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement> <supplement>
<project> <project>
<groupId>org.apache.directory.api</groupId> <groupId>org.apache.directory.api</groupId>
@ -783,6 +813,21 @@ under the License.
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
<version>4.0.1-incubating</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<!-- Used by Hadoop 2.6 --> <!-- Used by Hadoop 2.6 -->
<supplement> <supplement>
<project> <project>
@ -980,6 +1025,7 @@ under the License.
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<!-- Ambiguous license names in server and not in client --> <!-- Ambiguous license names in server and not in client -->
<supplement> <supplement>
<project> <project>
@ -1082,6 +1128,143 @@ Copyright 2006 Envoi Solutions LLC
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>com.codahale.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>3.0.1</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>3.9</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>2.4.0</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>1.4.0</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>com.twitter</groupId>
<artifactId>hpack</artifactId>
<version>0.11.0</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>1.1.1</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
<version>2.24</version>
<!-- versions 2.17+ are ASFv2 though pom says LGPL 2.1 until 2.45+ -->
<!-- https://github.com/RuedigerMoeller/fast-serialization/blob/master/LICENSE.md -->
<!-- https://github.com/RuedigerMoeller/fast-serialization/commit/526dd4#diff-600376-->
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project> <!-- hadoop.profile=3.0 from hadoop-3.0.0-alpha1 -->
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>2.1</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<!-- xercesImpl is necessary when using -Dhadoop.profile=3.0 due to a bug in maven. (last tested with mvn 3.3.9)
See HBASE-16712 for more details.-->
<supplement>
<project>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<!-- Permissive licenses that need text in LICENSE --> <!-- Permissive licenses that need text in LICENSE -->
<supplement> <supplement>
<project> <project>
@ -2047,4 +2230,43 @@ Copyright (c) 2007-2011 The JRuby project
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<version>1.0</version>
<organization>
<name>Brian Goetz and Tim Peierls</name>
<url>http://www.jcip.net</url>
</organization>
<licenses>
<license>
<name>Creative Commons Attribution License, Version 2.5</name>
<url>http://creativecommons.org/licenses/by/2.5</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
<version>1.0</version>
<organization>
<name>The Go Authors</name>
<url>https://github.com/google/re2j</url>
</organization>
<licenses>
<license>
<name>BSD license</name> <!-- the Go license is BDS 3 clause verbatim -->
<url>https://github.com/google/re2j/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
</supplementalDataModels> </supplementalDataModels>

View File

@ -1178,7 +1178,7 @@
<java.min.version>${compileSource}</java.min.version> <java.min.version>${compileSource}</java.min.version>
<!-- Dependencies --> <!-- Dependencies -->
<hadoop-two.version>2.7.1</hadoop-two.version> <hadoop-two.version>2.7.1</hadoop-two.version>
<hadoop-three.version>3.0.0-SNAPSHOT</hadoop-three.version> <hadoop-three.version>3.0.0-alpha1</hadoop-three.version>
<!-- These must be defined here for downstream build tools that don't look at profiles. <!-- These must be defined here for downstream build tools that don't look at profiles.
They ought to match the values found in our default hadoop profile, which is They ought to match the values found in our default hadoop profile, which is
currently "hadoop-2.0". See HBASE-15925 for more info. --> currently "hadoop-2.0". See HBASE-15925 for more info. -->