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/23 13:21:36 UTC
[47/50] 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/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 <lk...@redhat.com>
Authored: Tue Nov 15 11:21:34 2016 +0100
Committer: Stephen Mallette <sp...@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>