7 echo "Info: Java version"
8 echo "----------------------------------------------------"
9 $JAVA_HOME/bin/java -version
10 echo "----------------------------------------------------"
11 echo "Downloading Maven $MVN_VERSION from $MVN_URL"
12 wget -q $MVN_URL && unzip -qq apache-maven-${MVN_VERSION}-bin.zip
13 echo "Info: Maven version"
14 echo "----------------------------------------------------"
16 echo "----------------------------------------------------"
17 echo "Downloading ONAP Maven XML for build process from oparent repo"
18 echo "----------------------------------------------------"
19 git clone "https://git.onap.org/oparent" $WORKSPACE/oparent
21 # Check if a commitid parameter is given to specify a version of
22 # oparent repository to checkout. If commitid is not provided, the
23 # latest master version is used as default for backward
24 # compatibility for existing ONAP jobs.
26 if [[ -v ${MVN_SETTINGS_XML_VERSION} ]]; then
27 git checkout "${MVN_SETTINGS_XML_VERSION}"
30 # Copy Onap maven settings.xml to Jenkins home directory
31 if [ ! -d /home/jenkins/.m2 ]; then
32 mkdir -p /home/jenkins/.m2/
34 cp settings.xml /home/jenkins/.m2/settings.xml
36 echo "----------------------------------------------------"
37 echo "Proceeding with unit test"
38 echo "----------------------------------------------------"
39 $MVN clean install -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn