Skip to content

Commit 45c88d0

Browse files
committed
Trying to use downloaded maven version
1 parent 228d3dc commit 45c88d0

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ env:
1212
global:
1313
- DOCKER_CFG=$HOME/.docker
1414
- DOCKER_REPO="viniciusam/oracledb"
15-
- MAVEN_HOME=$HOME/.m2
16-
- MAVEN_SETTINGS=.travis/settings.xml
15+
- MAVEN_HOME=$HOME/apache-maven
1716
- UTPLSQL_VERSION="v3.0.0-beta"
1817
- UTPLSQL_FILE="utPLSQLv3.0.0.562-beta"
1918
matrix:
@@ -30,4 +29,4 @@ install:
3029
# - bash .travis/install_utplsql.sh
3130

3231
script:
33-
- mvn --settings $MAVEN_SETTINGS test -B
32+
- $MAVEN_HOME/bin/mvn test -B

.travis/maven_cfg.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,27 @@
22
set -ev
33
cd $(dirname $(readlink -f $0))
44

5+
if [ -d $MAVEN_HOME ]; then
6+
echo "Using cached maven install..."
7+
$MAVEN_HOME/bin/mvn -v
8+
exit 0
9+
fi
10+
511
if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
612
echo "Oracle OTN username/password not specified."
713
exit 1
814
fi
915

10-
# Copy the maven settings file to the right place, and set the username/password for oracle maven server.
11-
# cp settings.tmpl.xml $MAVEN_SETTINGS
12-
# sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $MAVEN_SETTINGS
13-
# sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $MAVEN_SETTINGS
16+
# If not cached, download and install maven.
17+
# Then create the settings file, with username/password for oracle server.
18+
curl -L -O "http://mirror.nbtelecom.com.br/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
19+
tar -xzf apache-maven-3.3.9-bin.tar.gz
20+
mv apache-maven-3.3.9 $MAVEN_HOME
21+
rm apache-maven-3.3.9-bin.tar.gz
1422

15-
echo $M2_HOME
16-
echo $JAVA_HOME
17-
ls -la $M2_HOME
18-
ls -la $MAVEN_HOME
23+
settingsFile=$MAVEN_HOME/conf/settings.xml
24+
cp settings.tmpl.xml $settingsFile
25+
sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $settingsFile
26+
sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $settingsFile
1927

20-
sudo find / -type d -iname "maven"
28+
$MAVEN_HOME/bin/mvn -v

0 commit comments

Comments
 (0)