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/02/15 11:47:00 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/31d815e4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/31d815e4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/31d815e4
Branch: refs/heads/TINKERPOP-1443
Commit: 31d815e4c4bd1a88c6779afc1d32f8751bf37a74
Parents: f33235c
Author: Lukas Krejci <lk...@redhat.com>
Authored: Tue Nov 15 11:21:34 2016 +0100
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 15 06:45:05 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/31d815e4/.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/31d815e4/.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/31d815e4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 87667fc..993737f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -277,6 +277,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>