prefetch maven 24/2024/1
authorC.J. Collier <cjcollier@linuxfoundation.org>
Tue, 19 Jul 2016 22:15:09 +0000 (15:15 -0700)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Tue, 19 Jul 2016 22:15:09 +0000 (15:15 -0700)
* install maven at basebuild respin time
* jenkins will be modified to point to pre-installed maven
* this will eliminate many problems caused by an inability to fetch
  common files

Change-Id: I93032bb08e8ce6ffc50cd89ce4c5f5d080e60726
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
vagrant/lib/bootstrap-functions.sh

index 7805f67..84e6595 100644 (file)
@@ -4,6 +4,18 @@ do_setup() {
     echo "127.0.1.1 $(hostname) # temporary" >> /etc/hosts
 }
 
+do_mvn_install() {
+    MAVEN_MIRROR=apache.mirrors.tds.net
+    MAVEN_VERSION=3.3.9
+    MAVEN_RELEASE=http://${MAVEN_MIRROR}/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz
+    MAVEN_HOME=/opt/apache/maven
+
+    mkdir -p /opt/apache/maven
+    wget -O - ${MAVEN_RELEASE} | \
+        tar xz -C ${MAVEN_HOME} --strip-components 1
+}
+
+
 do_cleanup() {
     perl -i -ne 'print unless /^127.0.1.1.*# temporary$/' /etc/hosts
 }