-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Linux
This issue might be related to JENKINS-9869, but the solution provided there does not seem to work for me.
I have a multi module maven project, which I'm trying to release through Jenkins instead of doing manually.
While the release:prepare & release:perform works fine if I do it manually, but the same command when running
through Jenkins gives me the following error (similar to that reported in JENKINS-9869) immediately
after checking out the tag in release:perform
Working directory "/var/lib/jenkins/jobs/..../workspace/target/checkout/workspace" does not exist
(notice the additional workspace at the end).
I also see the following warning when release:perform starts
[WARNING] Base directory is a file. Using base directory as POM location.
Some relevant Information about my project structure
Source Code of My Project is organized as follows
MyProject | + pom.xml | + -- build-tools (module1) | | | + -- pom.xml | + -- api (sub-module-1) | | | + -- pom.xml | + -- model (sub-module-2) | + -- pom.xml
SCM Info is available only in the root pom.xml (project base directory) and has the following info
<scm> <connection>scm:svn:svn://path/to/my/project/trunk/root/</connection> <developerConnection>scm:svn:svn://path/to/my/project/trunk/root/</developerConnection> </scm>
I have configured javasvn as the svn client using the following configuration in my root pom.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<commitByProject>true</commitByProject>
<username>me</username>
<password>my-password</password>
<providerImplementations>
<svn>javasvn</svn>
<username>me</username>
<password>my-password</password>
</providerImplementations>
<preparationGoals>clean install</preparationGoals>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>1.10</version>
</dependency>
</dependencies>
</plugin>
SVN Repository is in standard format containing tags, branches & trunk folder under path to my project.
Beneath trunk, I have another folder called root which has the project code base. (I have tried running
this with project structure directly in trunk folder as well - but did not help)
My situation is also similar to what was described in JENKINS-9869. release:prepare works fine even in Jenkins but
release:perform fails. The only funny thing that I notice is that the tag created after release:prepare
happens contains all siblings of root folder as well. I'm suspecting that there is something wrong with
the way tagging is happening which causes perform to fail.
I'm not the administrator of Jenkins installation, but can fetch information that you may need. I know
that Jenkins is using maven version 2.2.1 (and so am I on my local machine).
Any ideas on what could be going wrong. Thanks for your help in advance !!!!
I spent some time on my issue and managed to get past the problem.
One of my modules (build-tools) was not a sub-module of the root pom. This somehow creates trouble with jenkins. When I plug out this module, then jenkins could make the release properly.
Hope this helps somebody !!!!!