Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trying to use downloaded maven version
  • Loading branch information
viniciusam committed Apr 7, 2017
commit 45c88d061b13d358bae5624aab0e4256c1f2f118
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ env:
global:
- DOCKER_CFG=$HOME/.docker
- DOCKER_REPO="viniciusam/oracledb"
- MAVEN_HOME=$HOME/.m2
- MAVEN_SETTINGS=.travis/settings.xml
- MAVEN_HOME=$HOME/apache-maven
- UTPLSQL_VERSION="v3.0.0-beta"
- UTPLSQL_FILE="utPLSQLv3.0.0.562-beta"
matrix:
Expand All @@ -30,4 +29,4 @@ install:
# - bash .travis/install_utplsql.sh

script:
- mvn --settings $MAVEN_SETTINGS test -B
- $MAVEN_HOME/bin/mvn test -B
26 changes: 17 additions & 9 deletions .travis/maven_cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@
set -ev
cd $(dirname $(readlink -f $0))

if [ -d $MAVEN_HOME ]; then
echo "Using cached maven install..."
$MAVEN_HOME/bin/mvn -v
exit 0
fi

if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
echo "Oracle OTN username/password not specified."
exit 1
fi

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

echo $M2_HOME
echo $JAVA_HOME
ls -la $M2_HOME
ls -la $MAVEN_HOME
settingsFile=$MAVEN_HOME/conf/settings.xml
cp settings.tmpl.xml $settingsFile
sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $settingsFile
sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $settingsFile

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