Versions : maven 3.0.4 , release plugin 2.4.0
The goal is to release multiple features (projects) in one step using the maven release plugin, and in a non interactive way. I use : http://maven.apache.org/maven-release/maven-release-plugin/examples/non-interactive-release.html
Svn structure :
http://host/svn/feature1/trunk | tags | branches
http://host/svn/feature2/trunk | tags | branches
http://host/svn/feature3/trunk | tags | branches
Each feature have a pom.xml, with a specific version name, and scm url section.
With this structure, I wish to release all the features in one step (there is more than 12 features, and dependencies between them...). I was thinking that maven reactor plugin may help me a lot, to deploy and release all in the right order ;-) Then I create a "build / assembly" project branch in svn, with the following svn externals :
feature1 http://host/svn/feature1/trunk
feature2 http://host/svn/feature2/trunk
...
The goal using svn externals, is to have a flat workspace (it avoid issues with maven release plugin...). In this build project I have only one pom.xml, multi project aggregator of all the features.
<modules>
<module>feature1</module>
<module>feature2</module>
<module>feature3</module>
...
</modules>
Then I use maven release command :
mvn -B release:clean release:prepare release:perform
with the following release.properties
project.rel.org.sample.test\:feature1=1.0.0-RC1
project.dev.org.sample.test\:feature1=1.0.0-RC2-SNAPSHOT
project.scm.org.sample.test\:feature1.developerConnection=scm\:svn\:http\://host/svn/feature1/trunk
project.scm.org.sample.test\:feature1.connection=scm\:svn\:http\://host/svn/feature1/trunk
project.rel.org.sample.test\:feature2=1.0.0-RC1
project.dev.org.sample.test\:feature2=1.0.0-RC2-SNAPSHOT
...
With this file, and the -B argument, there is no need of an interactive input, asking features version to user. So, the job could be launch using jenkins :D...
At this step :
- scm commited changes are ok (scm url and version)
- the artifacts are well deployed
- But the features scm tags are not created in svn...
Only the scm tag of the root build / assembly project have been performed...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary:
[INFO] [INFO]
[INFO] [INFO] build ..................................... SUCCESS [1.104s]
[INFO] [INFO] feature1 .................................. SUCCESS [0.187s]
[INFO] [INFO] feature2 .................................. SUCCESS [0.648s]
[INFO] [INFO] feature3 .................................. SUCCESS [0.370s]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 2.552s
[INFO] [INFO] Finished at: Thu Jan 03 14:45:37 CET 2013
[INFO] [INFO] Final Memory: 9M/22M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Cleaning up after release...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] build ............................................. SUCCESS [7.201s]
[INFO] feature1 .......................................... SKIPPED
[INFO] feature2 .......................................... SKIPPED
[INFO] feature3 .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
The SKIPPED status for features seems strange in the summary (but it is SUCCESS for commiting and cleaning phases)
The problem is not really easy to explain, I hope to be clear...
Do anybody have met the same problem ? Some tricks / information to solve this problem ?