blob: d72dea4d9a8232352f6fa480675b8648d39ef137 [file] [log] [blame]
#!/bin/sh
cd trunk
if [ "x$M2_HOME" == "x" ]; then
echo variable M2_HOME must be set
exit 1
fi
if [ "x$proxyHost" != "x" ]; then
proxyOpts="-DproxySet=true -Dhttp.proxyHost=$proxyHost -Dhttp.proxyPort=$proxyPort"
if [ "x$nonProxyHosts" != "x" ] ; then
proxyOpts="$proxyOpts -Dhttp.nonProxyHosts=$nonProxyHosts"
fi
fi
if [ "x$mvnSettings" != "x" ]; then
settingsOpts="-s $mvnSettings"
fi
cd prepare_build
MVN_PREPARE_CALL="$M2_HOME/bin/mvn -Dmaven.repo.local=../.repository $ANT_OPTS -DproxyHost=$proxyHost -DproxyPort=$proxyPort $settingsOpts clean install"
echo $MVN_PREPARE_CALL
eval $MVN_PREPARE_CALL
set result=$?
cd ..
if [ "x$result" != "x" ]; then
exit $result
fi
MVN_CALL="$M2_HOME/bin/mvn -Dmaven.repo.local=../.repository $proxyOpts -fae $mvnArguments clean install $additionalPlugins"
echo $MVN_CALL
eval $MVN_CALL
set result=$?
echo result=$result
if [ "x$result" == "x" ]; then
ant -file copy-build-results.xml
fi
exit $result