HADOOP-18487. Protobuf 2.5 removal part 2: stop exporting protobuf-2.5 (#6185)
Followup to the previous HADOOP-18487 patch: changes the scope of protobuf-2.5 in hadoop-common and elsewhere from "compile" to "provided". This means that protobuf-2.5 is * No longer included in hadoop distributions * No longer exported by hadoop common POM files * No longer exported transitively by other hadoop modules. * No longer listed in LICENSE-binary. Contributed by Steve Loughran
This commit is contained in:
parent
ef7fb64764
commit
d634deea4e
24
BUILDING.txt
24
BUILDING.txt
@ -319,15 +319,11 @@ Controlling the redistribution of the protobuf-2.5 dependency
|
|||||||
the Hadoop codebase; alongside the move to Protobuf 3.x a private successor
|
the Hadoop codebase; alongside the move to Protobuf 3.x a private successor
|
||||||
class, org.apache.hadoop.ipc.internal.ShadedProtobufHelper is now used.
|
class, org.apache.hadoop.ipc.internal.ShadedProtobufHelper is now used.
|
||||||
|
|
||||||
The hadoop-common JAR still declares a dependency on protobuf-2.5, but this
|
The hadoop-common module no longer exports its compile-time dependency on
|
||||||
is likely to change in the future. The maven scope of the dependency can be
|
protobuf-2.5. Hadoop distributions no longer include it.
|
||||||
set with the common.protobuf2.scope option.
|
Any application declaring a dependency on hadoop-commmon will no longer get
|
||||||
It can be set to "provided" in a build:
|
the artifact added to their classpath.
|
||||||
-Dcommon.protobuf2.scope=provided
|
If is still required, then they must explicitly declare it:
|
||||||
If this is done then protobuf-2.5.0.jar will no longer be exported as a dependency,
|
|
||||||
and will then be omitted from the share/hadoop/common/lib/ directory of
|
|
||||||
any Hadoop distribution built. Any application declaring a dependency on hadoop-commmon
|
|
||||||
will no longer get the dependency; if they need it then they must explicitly declare it:
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
@ -335,6 +331,16 @@ Controlling the redistribution of the protobuf-2.5 dependency
|
|||||||
<version>2.5.0</version>
|
<version>2.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
In Hadoop builds the scope of the dependency can be set with the
|
||||||
|
option "common.protobuf2.scope".
|
||||||
|
This can be upgraded from "provided" to "compile" on the maven command line:
|
||||||
|
|
||||||
|
-Dcommon.protobuf2.scope=compile
|
||||||
|
|
||||||
|
If this is done then protobuf-2.5.0.jar will again be exported as a
|
||||||
|
hadoop-common dependency, and included in the share/hadoop/common/lib/
|
||||||
|
directory of any Hadoop distribution built.
|
||||||
|
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
Building components separately
|
Building components separately
|
||||||
|
|
||||||
|
@ -392,7 +392,6 @@ hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js
|
|||||||
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/d3-3.5.17.min.js
|
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/d3-3.5.17.min.js
|
||||||
leveldb v1.13
|
leveldb v1.13
|
||||||
|
|
||||||
com.google.protobuf:protobuf-java:2.5.0
|
|
||||||
com.google.protobuf:protobuf-java:3.6.1
|
com.google.protobuf:protobuf-java:3.6.1
|
||||||
com.google.re2j:re2j:1.1
|
com.google.re2j:re2j:1.1
|
||||||
com.jcraft:jsch:0.1.54
|
com.jcraft:jsch:0.1.54
|
||||||
|
@ -88,8 +88,8 @@
|
|||||||
<!-- This is used in hadoop-common for compilation only -->
|
<!-- This is used in hadoop-common for compilation only -->
|
||||||
<protobuf.version>2.5.0</protobuf.version>
|
<protobuf.version>2.5.0</protobuf.version>
|
||||||
<!-- Protobuf scope in hadoop common -->
|
<!-- Protobuf scope in hadoop common -->
|
||||||
<!-- set to "provided" and protobuf2 will no longer be exported as a dependency -->
|
<!-- set to "provided" so protobuf2 is no longer exported as a dependency -->
|
||||||
<common.protobuf2.scope>compile</common.protobuf2.scope>
|
<common.protobuf2.scope>provided</common.protobuf2.scope>
|
||||||
<!-- Protobuf scope in other modules which explicitly import the libarary -->
|
<!-- Protobuf scope in other modules which explicitly import the libarary -->
|
||||||
<transient.protobuf2.scope>${common.protobuf2.scope}</transient.protobuf2.scope>
|
<transient.protobuf2.scope>${common.protobuf2.scope}</transient.protobuf2.scope>
|
||||||
<!-- ProtocolBuffer version, actually used in Hadoop -->
|
<!-- ProtocolBuffer version, actually used in Hadoop -->
|
||||||
|
Loading…
Reference in New Issue
Block a user