diff options
author | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:33:07 -0700 |
---|---|---|
committer | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:33:07 -0700 |
commit | a95e947516d1cf5a597ef8a679352d525d0d73f5 (patch) | |
tree | 0674db35259ca50e9646bcde6164c0b139d335ab | |
parent | b9421dc80af485591a9c50cc8921f912e0def11e (diff) |
Updated build.sh to pull ant and maven and build in build directory
Change-Id: If52df43573ff28e6e79ec84f142a47a163a9044c
Signed-off-by: Ashlee Young <ashlee@onosfw.com>
-rwxr-xr-x | build.sh | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -41,8 +41,8 @@ export GERRITROOT="$(pwd)" export ONOSROOT=$GERRITROOT/framework/src/onos/ export BUILDROOT=$GERRITROOT/framework/build export JAVA_HOME=/etc/alternatives/java_sdk -export ANT_HOME=$GERRITROOT/framework/src/ant/apache-ant-1.9.6 -export M2_HOME=$GERRITROOT/framework/build/maven +export ANT_HOME=$GERRITROOT/framework/build/ant/apache-ant-1.9.6 +export M2_HOME=$GERRITROOT/framework/build/maven/build export M2=$M2_HOME/bin export PATH=$PATH:$ANT_HOME/bin:$M2:$JAVA_HOME/bin ##### End Set build environment ##### @@ -137,6 +137,12 @@ installAnt() printf "You may have Ant installed on your system, but to avoid build issues, we'd like \n" printf "to use our own. It will be installed at $ANT_HOME. \n" if ask "May we proceed with installing ant here?"; then + if [ ! -d "$GERRITROOT/framework/build/ant" ]; then + mkdir -p $GERRITROOT/framework/build/ant + cd $GERRITROOT/framework/build/ant + wget http://mirror.olnevhost.net/pub/apache/ant/source/apache-ant-$ANT_VERSION-src.tar.gz + tar xzvf apache-ant-$ANT_VERSION-src.tar.gz + fi cd $ANT_HOME sh build.sh install fi @@ -153,10 +159,14 @@ installMaven() printf "While you may or may not have Maven installed, our supported version is not yet installed.\n" if ask "May we install it?"; then clear + mkdir -p $GERRITROOT/framework/build/maven + cd $GERRITROOT/framework/build/maven printf "Maven version $MAVEN_VERSION is being installed in: \n" printf "$GERRITROOT/framework/build/maven.\n\n" sleep 3 - cd $GERRITROOT/framework/src/maven/apache-maven-$MAVEN_VERSION + wget http://supergsego.com/apache/maven/maven-3/3.3.3/source/apache-maven-3.3.3-src.tar.gz + tar xzvf apache-maven-3.3.3-src.tar.gz + cd $GERRITROOT/framework/build/maven/apache-maven-$MAVEN_VERSION ant cd $GERRITROOT fi |