bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ofle...@apache.org
Subject bigtop git commit: BIGTOP-2989: Support a local dir with tomcat, when download can't work
Date Tue, 06 Feb 2018 21:36:05 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master c6aad207f -> 34f581e3d


BIGTOP-2989: Support a local dir with tomcat, when download can't work

Signed-off-by: Olaf Flebbe <of@oflebbe.de>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/34f581e3
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/34f581e3
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/34f581e3

Branch: refs/heads/master
Commit: 34f581e3d3e35fdee554013a13469f42f890fa23
Parents: c6aad20
Author: Hari Krishna Dara <hdara@salesforce.com>
Authored: Sun Feb 4 21:38:42 2018 +0530
Committer: Olaf Flebbe <of@oflebbe.de>
Committed: Tue Feb 6 22:35:51 2018 +0100

----------------------------------------------------------------------
 bigtop-packages/src/common/hadoop/do-component-build | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/34f581e3/bigtop-packages/src/common/hadoop/do-component-build
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hadoop/do-component-build b/bigtop-packages/src/common/hadoop/do-component-build
index dcd802f..46b7dc1 100644
--- a/bigtop-packages/src/common/hadoop/do-component-build
+++ b/bigtop-packages/src/common/hadoop/do-component-build
@@ -52,11 +52,18 @@ fi
 
 mkdir build
 mkdir build/src
+ 
+# For build environments that don't support downloads from Internet, support a local source.
+if [ ! -z ${LOCAL_DOWNLOADS_DIR-} ] && [ -f $LOCAL_DOWNLOADS_DIR/tomcat/apache-tomcat-$BIGTOP_TOMCAT_VERSION.tar.gz
]; then
+  BIGTOP_TOMCAT_DOWNLOAD_URL=file://$LOCAL_DOWNLOADS_DIR/tomcat/apache-tomcat-$BIGTOP_TOMCAT_VERSION.tar.gz
+else
+  BIGTOP_TOMCAT_DOWNLOAD_URL=http://archive.apache.org/dist/tomcat/tomcat-6/v${BIGTOP_TOMCAT_VERSION}/bin/apache-tomcat-${BIGTOP_TOMCAT_VERSION}.tar.gz
+fi
 
 # Build artifacts
 MAVEN_OPTS="-Dzookeeper.version=$ZOOKEEPER_VERSION"
 MAVEN_OPTS="$MAVEN_OPTS -DskipTests -DskipTest -DskipITs"
-mvn $ANT_OPTS $BUNDLE_SNAPPY -Pdist -Pnative -Psrc -Dtar ${MAVEN_OPTS} -Dtomcat.version=${BIGTOP_TOMCAT_VERSION}
-Dtomcat.download.url="http://archive.apache.org/dist/tomcat/tomcat-6/v${BIGTOP_TOMCAT_VERSION}/bin/apache-tomcat-${BIGTOP_TOMCAT_VERSION}.tar.gz"
install package "$@"
+mvn $ANT_OPTS $BUNDLE_SNAPPY -Pdist -Pnative -Psrc -Dtar ${MAVEN_OPTS} -Dtomcat.version=${BIGTOP_TOMCAT_VERSION}
-Dtomcat.download.url="$BIGTOP_TOMCAT_DOWNLOAD_URL" install package "$@"
 mvn site site:stage ${MAVEN_OPTS} $@
 
 (cd build ; tar --strip-components=1 -xzvf  ../hadoop-dist/target/hadoop-${HADOOP_VERSION}.tar.gz)


Mime
View raw message