You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/01/12 13:25:35 UTC

[3/7] tinkerpop git commit: Make Travis use a newer version of Maven.

Make Travis use a newer version of Maven.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8ce12041
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8ce12041
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8ce12041

Branch: refs/heads/TINKERPOP-1443
Commit: 8ce120415b5ef0e08ed18bae3fa38dd01558e2ce
Parents: 992800b
Author: Lukas Krejci <lk...@redhat.com>
Authored: Tue Nov 15 11:21:34 2016 +0100
Committer: Lukas Krejci <lk...@redhat.com>
Committed: Tue Nov 15 11:21:34 2016 +0100

----------------------------------------------------------------------
 .travis.install-maven.sh | 19 +++++++++++++++++++
 .travis.yml              | 12 ++++++++++++
 pom.xml                  |  1 +
 3 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ce12041/.travis.install-maven.sh
----------------------------------------------------------------------
diff --git a/.travis.install-maven.sh b/.travis.install-maven.sh
new file mode 100644
index 0000000..66affe6
--- /dev/null
+++ b/.travis.install-maven.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -xe
+
+MVN_VERSION="$1"
+MVN_INSTALL_DIR="$2"
+
+if [ ! -f "${MVN_INSTALL_DIR}/lib/maven-artifact-${MVN_VERSION}.jar" ]; then
+  rm -Rf "${MVN_INSTALL_DIR}"
+  mkdir -p "${MVN_INSTALL_DIR}"
+
+  APACHE_MIRROR="$(curl -sL https://www.apache.org/dyn/closer.cgi?asjson=1 | python -c 'import sys, json; print json.load(sys.stdin)["preferred"]')"
+  curl -o "${HOME}/apache-maven-$MVN_VERSION-bin.tar.gz" "$APACHE_MIRROR/maven/maven-3/$MVN_VERSION/binaries/apache-maven-$MVN_VERSION-bin.tar.gz"
+  cd "${MVN_INSTALL_DIR}"
+  tar -xzf "${HOME}/apache-maven-$MVN_VERSION-bin.tar.gz" --strip 1
+  chmod +x "${MVN_INSTALL_DIR}/bin/mvn"
+else
+  echo "Using cached Maven ${MVN_VERSION}"
+fi
+${MVN_INSTALL_DIR}/bin/mvn -version

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ce12041/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 56c729d..12a55d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,18 @@ jdk:
   - oraclejdk8
 sudo: required
 dist: trusty
+cache:
+  directories:
+    - $HOME/mvn-home
+
+install:
+  # install maven 3.3.9 if it is not in cache already
+  - bash .travis.install-maven.sh "3.3.9" "${HOME}/mvn-home"
+  - export M2_HOME=${HOME}/mvn-home
+  - export PATH=${HOME}/mvn-home/bin:${PATH}
+  # visual check that we have the correct maven version installed
+  - mvn -version
+
 addons:
   apt:
     packages:

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ce12041/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9af0ab6..20969e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,6 +271,7 @@ limitations under the License.
                     <excludeSubProjects>false</excludeSubProjects>
                     <excludes>
                         <exclude>.travis.yml</exclude>
+                        <exclude>.travis.*.sh</exclude>
                         <exclude>.dockerignore</exclude>
                         <exclude>**/.classpath</exclude>
                         <exclude>**/.project</exclude>