Hi,
I'm using the latest version of Jenkins, SVN 1.7, and just installed the
Maven Release plugin for Jenkins. Is there any way to configure the Maven
release plugin to do a fresh checkout from SVN before it runs? I'm running
the plugin by doing the following:
- From my job, clicking Perform Maven Release from the left panel
- Clicking the checkbox Specify SCM login/password and filling in my SVN
username and password.
- Clicking the button Schedule Maven Release Build
However, I'm getting the error, Cannot prepare the release because you
have local modifications. The plugin doesn't appear to have any other
configuration options. Below is the complete stack trace.
===Begin stack trace
Building remotely on s-17abf238 in workspace /scratch/jenkins/workspace/test
Updating https://mydomain.com/svn/subco-digitalurl at revision
'2013-06-26T14:37:39.249 +'
At revision 2078
no change for https://mydomain.com/svn/subco-digitalurl since the previous
build
Parsing POMs
Modules changed, recalculating dependency graph
[test] $ /opt/jdk/jdk1.7.latest/bin/java -Dmaven.test.failure.ignore=false
-cp
/scratch/jenkins/maven3-agent.jar:/opt/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar
org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/apache-maven-3.0.4
/scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar 57596
===[JENKINS REMOTING CAPACITY]===channel started
log4j:WARN No appenders could be found for logger
(org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f /scratch/jenkins/workspace/test/test/pom.xml
-DdevelopmentVersion=1.2-SNAPSHOT -DreleaseVersion=1.1 -Dusername=myuser
-Dpassword=* -Dresume=false release:prepare release:perform
[INFO] Scanning for projects...
Projects to build: [MavenProject: org.myco.subco:test:1.1-SNAPSHOT @
/scratch/jenkins/workspace/test/test/pom.xml]
projectStarted org.myco.subco:test:1.1-SNAPSHOT
[INFO]
[INFO]
[INFO] Building test 1.1-SNAPSHOT
[INFO]
mojoStarted org.apache.maven.plugins:maven-release-plugin:2.0(default-cli)
[INFO]
[INFO] --- maven-release-plugin:2.0:prepare (default-cli) @ test ---
[INFO] Verifying that there are no local modifications...
[INFO] Executing: /bin/sh -c cd /scratch/jenkins/workspace/test/test svn
--username myuser --password '*' --non-interactive status
[INFO] Working directory: /scratch/jenkins/workspace/test/test
mojoFailed org.apache.maven.plugins:maven-release-plugin:2.0(default-cli)
projectFailed org.myco.subco:test:1.1-SNAPSHOT
sessionEnded
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 8.227s
[INFO] Finished at: Wed Jun 26 14:38:24 UTC 2013
[INFO] Final Memory: 12M/205M
[INFO]
Projects to build: [MavenProject: org.myco.subco:test:1.1-SNAPSHOT @
/scratch/jenkins/workspace/test/test/pom.xml]
[JENKINS] Archiving /scratch/jenkins/workspace/test/test/pom.xml to
/home/evotext/hudson_home/jobs/test/modules/org.myco.subco$test/builds/2013-06-26_14-38-09/archive/org.myco.subco/test/1.1-SNAPSHOT/test-1.1-SNAPSHOT.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on
project test: Cannot prepare the release because you have local
modifications :
[target/maven-archiver/pom.properties:modified]
[target/surefire-reports/TEST-org.myco.subco.AppTest.xml:modified]
[target/surefire-reports/org.myco.subco.AppTest.txt:modified]
[target/test-1.1-SNAPSHOT.jar:unknown]
cause : Cannot prepare the release because you have local modifications :
[target/maven-archiver/pom.properties:modified]
[target/surefire-reports/TEST-org.myco.subco.AppTest.xml:modified]
[target/surefire-reports/org.myco.subco.AppTest.txt:modified]
[target/test-1.1-SNAPSHOT.jar:unknown]
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare
(default-cli) on project test: Cannot prepare the release because you have
local modifications :
[target/maven-archiver/pom.properties:modified]
[target/surefire-reports/TEST-org.myco.subco.AppTest.xml:modified]
[target/surefire-reports/org.myco.subco.AppTest.txt:modified]
[target/test-1.1-SNAPSHOT.jar:unknown]
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at