diff options
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/travis.sh b/travis.sh index 965fc5d213c..e12de64028e 100755 --- a/travis.sh +++ b/travis.sh @@ -17,24 +17,43 @@ function installPhantomJs { } # -# A (too) old version of JDK8 is installed by default on Travis +# A (too) old version of JDK8 is installed by default on Travis. +# This method is preferred over Travis apt oracle-java8-installer because +# JDK is kept in cache. It does not need to be downloaded from Oracle +# at each build. # function installJdk8 { - echo "Setup JDK 1.8u92" + echo "Setup JDK 1.8u121" mkdir -p ~/jvm pushd ~/jvm > /dev/null - if [ ! -d "jdk1.8.0_92" ]; then + if [ ! -d "jdk1.8.0_121" ]; then echo "Download JDK8" - wget -c --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz - tar xzf jdk-8u92-linux-x64.tar.gz - rm jdk-8u92-linux-x64.tar.gz + wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz + tar xzf jdk-8u121-linux-x64.tar.gz + rm jdk-8u121-linux-x64.tar.gz fi popd > /dev/null - export JAVA_HOME=~/jvm/jdk1.8.0_92 + export JAVA_HOME=~/jvm/jdk1.8.0_121 export PATH=$JAVA_HOME/bin:$PATH } # +# Maven 3.2.5 is installed by default on Travis. Maven 3.3.9 is preferred. +# +function installMaven { + echo "Setup Maven" + mkdir -p ~/maven + pushd ~/maven > /dev/null + if [ ! -d "apache-maven-3.3.9" ]; then + echo "Download Maven 3.3.9" + curl -sSL http://apache.mirrors.ovh.net/ftp.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | tar zx -C ~/maven + fi + popd > /dev/null + export M2_HOME=~/maven/apache-maven-3.3.9 + export PATH=$M2_HOME/bin:$PATH +} + +# # Replaces the version defined in sources, usually x.y-SNAPSHOT, # by a version identifying the build. # The build version is composed of 4 fields, including the semantic version and @@ -108,6 +127,7 @@ BUILD) ./clock.sh & installJdk8 + installMaven fixBuildVersion # Minimal Maven settings |