3
3
cd $( dirname $( readlink -f $0 ) )
4
4
5
5
mavenSettings=$HOME /.m2/settings.xml
6
+ mavenCached=$HOME /.m2/.cached
6
7
7
- if [ -d $mavenSettings ]; then
8
+ if [ -f $mavenCached ]; then
8
9
echo " Using cached maven user config..."
9
10
exit 0
10
11
fi
@@ -14,19 +15,14 @@ if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
14
15
exit 1
15
16
fi
16
17
17
- # If not cached, download and install maven.
18
- # Then create the settings file, with username/password for oracle server.
19
- # curl -L -O "http://mirror.nbtelecom.com.br/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
20
- # tar -xzf apache-maven-3.3.9-bin.tar.gz
21
- # mv apache-maven-3.3.9 $MAVEN_HOME
22
- # rm apache-maven-3.3.9-bin.tar.gz
23
-
18
+ # Download wagon-http recommended by Oracle.
19
+ # On maven latest version this is not needed, but travis doesn't have it.
24
20
curl -L -O " http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.8/wagon-http-2.8-shaded.jar"
25
21
sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME /lib/ext/
26
22
27
- # MAVEN_CFG=$MAVEN_HOME/conf/ settings.xml
23
+ # Create the settings file with oracle server config.
28
24
cp settings.tmpl.xml $mavenSettings
29
25
sed -i -e " s|###USERNAME###|$ORACLE_OTN_USER |g" $mavenSettings
30
26
sed -i -e " s|###PASSWORD###|$ORACLE_OTN_PASSWORD |g" $mavenSettings
31
27
32
- # $MAVEN_HOME/bin/mvn -v
28
+ touch $mavenCached
0 commit comments