concurrent: true
mvn_settings_xml_version:
mvn_params:
+ subdirectory:
properties:
- logrotate
name: MVN_PARAMS
default: '{mvn_params}'
description: Maven build parameters
+ - string:
+ name: SUBDIRECTORY
+ default: '{subdirectory}'
+ description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
scm:
- git-scm-gerrit:
ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
fi
cp settings.xml /home/jenkins/.m2/settings.xml
cd $WORKSPACE
+
+POMFILE="-f $WORKSPACE/pom.xml"
+set +o nounset
+if [[ -n ${SUBDIRECTORY} ]]; then
+ POMFILE="-f $WORKSPACE/$SUBDIRECTORY/pom.xml"
+ echo "Setting pom.xml to use to $POMFILE"
+fi
+set -o nounset
+
echo "----------------------------------------------------"
echo "Proceeding with unit test"
echo "----------------------------------------------------"
-$MVN clean install -U -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $LOCAL_MVN_PARAMS
+$MVN clean install -U -B $POMFILE -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $LOCAL_MVN_PARAMS