Re: maven release plugin and subversion externals
Start with reading the Maven release plugin description, specially prepare and perform action's documentation. This problem with svn:externals is that IF you are using svn:externals that link to the project itself the release branch will point to the trunk. release:prepare phase will 1. crawls the project's pom.xml and change the version number to the given release version 2. commits the changed code to SVN repo using each module's scm developerConnection - value 3. makes an svn copy of the revision it jsut committed to svn to the tagbase (defaulting to ../tags relative to scm-developerConnection value 4. it then again crawls the project's pom.xml and change the version number to the next SNAPSHOT version NOW, here is the problem ! Let's assume that you have the externals properties defined to the projects root folder. Now when the release:prepare makes a copy of that folder in SVN it is a copy and that copy contains identical properties. So both the folder in trunk and the copy of the folder in release - branch contain IDENTICAL dynamic links to the trunk of the modules sub folders which now have the next -SNAPSHOT version in them. So when you run the release:perform it releases the the next SNAPSHOT, not the release. This is easy to fix, but only as long as you are using svn:externals _ONLY_ at the root level of the project ! You must do little magic between running release:prepare and relese:perform. So you ABSOLUTELY MUST NOT run in same mvn command (mvn relese:prepare release:perform) ! Instead you must: 1. First run the release prepare. 2. The look at the Maven ouput (or run: mvn log . ) to find revision number of the relase branch version (svn copy). 3. Now armed with the revision number of the release you must checkout the new release branch to some temp folder (The HEAD not the revision!). Go the the folder where you just checked out the release branch and edit that folder's svn properties, svn propedit svn:externals . and add the revision we talked about to each modules link definition -r123. Then remember to commit it back to svn ! 4. That's it ! Now Go back to the folder you ran the release:prepare at. And delete this temp folder to where you checked out the release to. Now run mvn release:perform which checks out the release branch to a temp folder where it build, tests and deploys artifacts to the maven repo. Now that the links in SVN release branch point to correct revision of the source code everything works ok. You do need to do this for every time you make a relase. You can script all this. P.S. When I talk about branch I mean svn release tag, I just feel in this context word branch better describes what we are doing (and in svn there is no tag or branch, just copy). -- View this message in context: http://maven.40175.n5.nabble.com/maven-release-plugin-and-subversion-externals-tp109483p5710913.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
That method will work fine with projects external repos. Just as long as there are no svn:external links inside the folders itself come from svn:externals link. Other important thing to note is that if you are using separeate aggregation and root pom's in the project. then you must have relativePath definition in you modules' parent -tags. -- View this message in context: http://maven.40175.n5.nabble.com/maven-release-plugin-and-subversion-externals-tp109483p5710914.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
Karl Heinz Marbaise wrote: ... first: Have you defined scm section in your root pom ? Yes, each module and the parent has its own scm section. If we remove the modules section from the parent we can release the modules and the parent in single steps. Karl Heinz Marbaise wrote: we are using svn:externals to add our modules into the parent directory. We can build, test, deploy ... but we can't create a release. The release is only How do you use the externals ? fixed to a particular release via tag name or trunk with a particular revision ? ... we are referencing the trunk of the modules without a revision http://svn/repo/module1/trunk module1 http://svn/repo/module2/trunk module2 Yours Rüdiger -- View this message in context: http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4518752.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
Hi, We are calling: mvn release.clean release:prepare release:perform and there are no error messages. If you do an mvn release:perform ...aren't you asked for the release version etc. during the process ? Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
Hi, we are referencing the trunk of the modules without a revision http://svn/repo/module1/trunk module1 http://svn/repo/module2/trunk module2 This brings me to the question: Why not putting all modules in the folder structure Root +--- module1 +--- module2 without using svn:externals ? I don't see the needs for using externals if you are referencing the trunk of the modules...? Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
Karl Heinz Marbaise wrote: ... If you do an mvn release:perform ...aren't you asked for the release version etc. during the process ? ... I'm asked for the release version for all modules but only asked for the new SNAPSHOT version for the parent module. Karl Heinz Marbaise wrote: ... Why not putting all modules in the folder structure Root +--- module1 +--- module2 without using svn:externals ? ... Thats a company policy. The modules are in different svn repositorys. Yours Rüdiger -- View this message in context: http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4519649.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven release plugin and subversion externals
Hello, we are using svn:externals to add our modules into the parent directory. We can build, test, deploy ... but we can't create a release. The release is only created for the parent (which is only a pom module). There are no tags in subversion and no artifacts released to the repository. In our parent the modules are referenced as modules moduleA/module moduleB/module /modules We are calling: mvn release.clean release:prepare release:perform and there are no error messages. What is going wrong with the releases? Yours Rüdiger -- View this message in context: http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4514253.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven release plugin and subversion externals
Hi there first: Have you defined scm section in your root pom ? we are using svn:externals to add our modules into the parent directory. We can build, test, deploy ... but we can't create a release. The release is only How do you use the externals ? fixed to a particular release via tag name or trunk with a particular revision ? Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org