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}"
31 # if MVN_PARAMS set then use them otherwise default to ""
34 if [[ -n ${MVN_PARAMS} ]]; then
35 LOCAL_MVN_PARAMS=${MVN_PARAMS}
39 # Copy Onap maven settings.xml to Jenkins home directory
40 if [ ! -d /home/jenkins/.m2 ]; then
41 mkdir -p /home/jenkins/.m2/
43 cp settings.xml /home/jenkins/.m2/settings.xml
45 echo "----------------------------------------------------"
46 echo "Proceeding with unit test"
47 echo "----------------------------------------------------"
48 $MVN clean install -U -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $LOCAL_MVN_PARAMS