diff --git a/BUILDING.txt b/BUILDING.txt index 8b2bba6882..7afc3f0bb2 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -390,7 +390,7 @@ http://www.zlib.net/ ---------------------------------------------------------------------------------- Building distributions: - * Build distribution with native code : mvn package [-Pdist][-Pdocs][-Psrc][-Dtar] + * Build distribution with native code : mvn package [-Pdist][-Pdocs][-Psrc][-Dtar][-Dmaven.javadoc.skip=true] ---------------------------------------------------------------------------------- Running compatibility checks with checkcompatibility.py @@ -402,3 +402,12 @@ managers to compare the compatibility of a previous and current release. As an example, this invocation will check the compatibility of interfaces annotated as Public or LimitedPrivate: ./dev-support/bin/checkcompatibility.py --annotation org.apache.hadoop.classification.InterfaceAudience.Public --annotation org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate --include "hadoop.*" branch-2.7.2 trunk + +---------------------------------------------------------------------------------- +Changing the Hadoop version declared returned by VersionInfo + +If for compatibility reasons the version of Hadoop has to be declared as a 2.x release in the information returned by +org.apache.hadoop.util.VersionInfo, set the property declared.hadoop.version to the desired version. +For example: mvn package -Pdist -Ddeclared.hadoop.version=2.11 + +If unset, the project version declared in the POM file is used. diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index c9b282fb24..aa20f79c87 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -36,6 +36,9 @@ true ../etc/hadoop wsce-site.xml + + ${pom.version} diff --git a/hadoop-common-project/hadoop-common/src/main/resources/common-version-info.properties b/hadoop-common-project/hadoop-common/src/main/resources/common-version-info.properties index ad9a24d590..9b74960cf7 100644 --- a/hadoop-common-project/hadoop-common/src/main/resources/common-version-info.properties +++ b/hadoop-common-project/hadoop-common/src/main/resources/common-version-info.properties @@ -16,11 +16,11 @@ # limitations under the License. # -version=${pom.version} +version=${declared.hadoop.version} revision=${version-info.scm.commit} branch=${version-info.scm.branch} user=${user.name} date=${version-info.build.time} url=${version-info.scm.uri} srcChecksum=${version-info.source.md5} -protocVersion=${protobuf.version} \ No newline at end of file +protocVersion=${protobuf.version} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-version-info.properties b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-version-info.properties index 9a8575c6de..ee6f13d77d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-version-info.properties +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-version-info.properties @@ -16,7 +16,7 @@ # limitations under the License. # -version=${pom.version} +version=${declared.hadoop.version} revision=${version-info.scm.commit} branch=${version-info.scm.branch} user=${user.name}