tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [47/50] tinkerpop git commit: Make Travis use a newer version of Maven.
Date Mon, 23 Jan 2017 13:21:36 GMT
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/e84146b1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e84146b1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e84146b1

Branch: refs/heads/TINKERPOP-1443
Commit: e84146b1cf4f5e34bb5579937387edf51825a485
Parents: 355e1dc
Author: Lukas Krejci <lkrejci@redhat.com>
Authored: Tue Nov 15 11:21:34 2016 +0100
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Jan 23 08:19:25 2017 -0500

----------------------------------------------------------------------
 .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/e84146b1/.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/e84146b1/.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/e84146b1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ebf06a3..66dee1d 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>


Mime
View raw message