4.0.0
org.apache.hadoop
hadoop-project
3.0.0-SNAPSHOT
../hadoop-project
org.apache.hadoop
hadoop-project-dist
3.0.0-SNAPSHOT
Apache Hadoop Project Dist POM
Apache Hadoop Project Dist POM
pom
${project.build.directory}/test
${project.build.directory}/test/data
${project.build.directory}/log
${project.build.directory}/test-classes/webapps
${project.build.directory}/test-classes
${project.build.directory}/test-classes
UNDEF
false
false
false
false
false
org.apache.hadoop
hadoop-annotations
provided
org.apache.maven.plugins
maven-jar-plugin
prepare-jar
prepare-package
jar
prepare-test-jar
prepare-package
test-jar
**/*.class
webapps/**
org.apache.maven.plugins
maven-source-plugin
prepare-package
jar
test-jar
true
org.codehaus.mojo
findbugs-maven-plugin
${basedir}/dev-support/findbugsExcludeFile.xml
true
2048
org.apache.maven.plugins
maven-javadoc-plugin
true
512m
true
false
${maven.compile.encoding}
${project.build.directory}/site
api
${project.name} API
org.apache.hadoop*
org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet
org.apache.hadoop
hadoop-annotations
${project.version}
true
false
org.apache.hadoop:hadoop-annotations
docs
false
2.6.0
-unstable
512m
org.apache.maven.plugins
maven-javadoc-plugin
javadoc
prepare-package
org.codehaus.mojo
findbugs-maven-plugin
findbugs
prepare-package
${basedir}/dev-support/findbugsExcludeFile.xml
org.apache.maven.plugins
maven-dependency-plugin
site
prepare-package
copy
jdiff
jdiff
${jdiff.version}
false
${project.build.directory}
jdiff.jar
org.apache.hadoop
hadoop-annotations
${project.version}
false
${project.build.directory}
hadoop-annotations.jar
xerces
xercesImpl
${xerces.jdiff.version}
false
${project.build.directory}
xerces.jar
org.apache.maven.plugins
maven-antrun-plugin
site
prepare-package
run
dist
false
org.apache.maven.plugins
maven-antrun-plugin
pre-dist
prepare-package
run
# Bundle a native library if requested. Exit 1 in case error happens.
# Usage: bundle_native_lib bundleOption libOption libPattern libDir
function bundle_native_lib() {
bundleOption="$1"
libOption="$2"
libPattern="$3"
libDir="$4"
echo "Checking to bundle with:"
echo "bundleOption=${bundleOption}, libOption=${libOption}, libDir=${libDir}, pattern=${libPattern}"
if [[ "${bundleOption}" != "true" ]]; then
return
fi
if [[ -z "${libDir}" ]] || [[ ! -d ${libDir} ]]; then
echo "The required option $libOption isn't given or invalid. Bundling the lib failed"
exit 1
fi
cd "$libDir"
$$TAR *$libPattern* | (cd $${TARGET_DIR}/; $$UNTAR)
if [[ $? -ne 0 ]]; then
echo "Bundling library with ${libOption} failed "
exit 1
fi
}
BUILD_DIR="${project.build.directory}"
TAR='tar cf -'
UNTAR='tar xfBp -'
LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
set -o pipefail
if [[ -d $${LIB_DIR} ]]; then
TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
mkdir -p $${TARGET_DIR}
cd $${LIB_DIR}
$$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
if [[ $? -ne 0 ]]; then
echo "Bundling lib files failed"
exit 1
fi
echo bundle_native_lib "${bundle.snappy}" "snappy.lib" "snappy" "${snappy.lib}"
bundle_native_lib "${bundle.snappy}" "snappy.lib" "snappy" "${snappy.lib}"
echo bundle_native_lib "${bundle.openssl}" "openssl.lib" "crypto" "${openssl.lib}"
bundle_native_lib "${bundle.openssl}" "openssl.lib" "crypto" "${openssl.lib}"
echo bundle_native_lib "${bundle.isal}" "isal.lib" "isa" "${isal.lib}"
bundle_native_lib "${bundle.isal}" "isal.lib" "isa" "${isal.lib}"
fi
BIN_DIR="${BUILD_DIR}/bin"
if [[ -d $${BIN_DIR} ]] ; then
TARGET_BIN_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/bin"
mkdir -p $${TARGET_BIN_DIR}
cd $${BIN_DIR}
$$TAR * | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
if [[ $? -ne 0 ]]; then
echo "Bundling bin files failed"
exit 1
fi
if [[ "${bundle.snappy.in.bin}" == "true" ]]; then
if [[ "${bundle.snappy}" == "true" ]]; then
cd "${snappy.lib}"
$$TAR *snappy* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
if [[ $? -ne 0 ]]; then
echo "Bundling snappy bin files failed"
exit 1
fi
fi
fi
if [[ "${bundle.openssl.in.bin}" == "true" ]]; then
if [[ "${bundle.openssl}" == "true" ]]; then
cd "${openssl.lib}"
$$TAR *crypto* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
if [[ $? -ne 0 ]]; then
echo "Bundling openssl bin files failed"
exit 1
fi
fi
fi
fi
tar
package
run
cd "${project.build.directory}"
tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
org.apache.maven.plugins
maven-assembly-plugin
org.apache.hadoop
hadoop-assemblies
${project.version}
dist
prepare-package
single
false
false
${project.artifactId}-${project.version}
hadoop-dist