Skip to content

Commit

Permalink
chore: Change jenkins/build.sh to allow passing maven parameters (#2723)
Browse files Browse the repository at this point in the history
  • Loading branch information
surli authored and monperrus committed Oct 27, 2018
1 parent 96d3150 commit 497b828
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions doc/jenkins/build.sh
Expand Up @@ -2,15 +2,17 @@
#
# Compiles an open-source project, spoons the project, runs the tests
# and checks at each step if there aren't errors. To execute this
# script, create a job in jenkins.
# script, create a job in jenkins.
#
# is also run in Travis to check this script and the compatibility with Spoon Maven Plugin
#
# Typical usage:
#
#
# $ cd my-maven-project-with-pom
# $ curl http://spoon.gforge.inria.fr/jenkins/build.sh | bash

# Allow to define some options to the maven command, such as debug or memory options
MAVEN_COMMAND="mvn $MVN_OPTS"

echo " "
echo "-------------------------------------------------------"
Expand Down Expand Up @@ -85,7 +87,7 @@ echo " "

# Compiles project.
START_COMPILE_PROJECT=$(($(date +%s%N)/1000000))
mvn clean install
$MAVEN_COMMAND clean install
if [ "$?" -ne 0 ]; then
echo "Error: Maven compile original project unsuccessful!"
exit 1
Expand Down Expand Up @@ -172,11 +174,11 @@ rm pom.bak*.xml

# Purge the project from snapshots
# Avoid to use an old snapshot of Spoon and force the resolution
mvn dependency:purge-local-repository -DmanualInclude="fr.inria.gforge.spoon:spoon-core" -DsnapshotsOnly=true
$MAVEN_COMMAND dependency:purge-local-repository -DmanualInclude="fr.inria.gforge.spoon:spoon-core" -DsnapshotsOnly=true

# Compiles project with spoon configuration.
START_COMPILE_WITH_SPOON=$(($(date +%s%N)/1000000))
mvn clean install
$MAVEN_COMMAND clean install
if [ "$?" -ne 0 ]; then
echo "Error: Maven compile with spoon unsuccessful!"
exit 1
Expand Down Expand Up @@ -266,7 +268,7 @@ done

# Compiles project with source spooned.
START_COMPILE_SPOON_SPOON=$(($(date +%s%N)/1000000))
mvn clean install
$MAVEN_COMMAND clean install
if [ "$?" -ne 0 ]; then
echo "Error: Maven compile with spoon(spoon) unsuccessful!"
exit 1
Expand Down

0 comments on commit 497b828

Please sign in to comment.