Hello Barrie, thanks for your time and your helpful suggestions. Please see my comments below.
Johannes > -----Ursprüngliche Nachricht----- > Von: Barrie Treloar [mailto:baerr...@gmail.com] > Gesendet: Freitag, 28. August 2009 02:00 > An: Maven Developers List > Betreff: Re: MRELEASE-261 - Fix for Maven2 Release Plugin > concerning flat multi-project structures does not work for us > > On Fri, Aug 28, 2009 at 6:09 AM, > <johannes.konstantini...@capgemini-sdm.com> wrote: > > Hello everyone, > > > > we have a problem with the Release Plugin due to our flat > > multi-project structure in both the developer's hard drive > and the CVS repository. > > The bug is described in > http://jira.codehaus.org/browse/MRELEASE-225, > > which is marked as duplicate of > > http://jira.codehaus.org/browse/MRELEASE-261 > > although I think they describe slightly different problems. > > It sounds likes you have a bunch of issues that aren't easily > addressed. I think it sounds worse than it is. :-) > > A non-maven workaround might be to manually release each project. > > Modules give you the "helper" ability to run a maven command > at the top of a project and for the same command to be > applied to all modules (recursively). > But this doesn't affect the dependency declarations in anyway > (they stay the same regardless of whether there are modules > present or not) We do use modules in our parent pom (anything-else\anything-parent\pom.xml) <modules> <module>..\anything-module1</module> <module>..\anything-module2</module> <module>..\anything-module3</module> </modules> > > I'm assuming you have customized parent/relativePath in your > poms to get the flat structure. No, the child poms only contain <parent> <groupId>anything</groupId> <artifactId>anything-parent</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> > If maven can't find the parent then it will use the installed > version instead. > You will need to delete parent/relativePath to try this. > > So if you remove all modules (and parent/relativePath) and > then manually invoke mvn release on each project in the same > order that the module defintions would have you should have > the correct behaviour. Releasing one single project works. May I remind you, that the the directory structure on the disk is not the problem. It's the missing hierarchy in the CVS repository. The plugin seems not to be able to handle this missing hierarchy. If the disk was flat but the repository would look like - anything-else | |- anything-parent |- pom.xml |- anything-module1 |- pom.xml |- anything-module2 |- pom.xml |- anything-module3 |- pom.xml it would work, because with checking out anything-else\anything-parent all the files would be on the disk. But the directory structure looks like - anything-else | |- anything-parent | |- pom.xml |- anything-module1 | |- pom.xml |- anything-module2 | |- pom.xml |- anything-module3 |- pom.xml So the plugin checks out anything-else\anything-parent (and subfolders) and does not realize, that this is not enough. I think the calculation of the rootProjectPath might not be correct (or I don't understand it :-) ) I would expect that the rootProjectPath is the path segment common to all modules. For calculation I would check the parent's and the module's directories so that my result of a structure like - anything-else | |- anything-parent | |- pom.xml |- anything-module1 | |- pom.xml |- anything-module2 | |- pom.xml |- anything-module3 |- pom.xml would be "anything-else", which is common to all modules. But the currently implemented solution is to find common segments of the project's base director (f.i. C:\anything-else\anything-parent) and the scm-connection (f.i. ...host:port:repository:anything-else\anything-parent) That leads to a working directory like anything-else\anything-parent. anything-else != anything-else\anything-parent Any ideas? > > You should be able to see if this is a viable solution after > the first couple of released projects. > If it is viable you can then script the maven commands. Well, with Maria Odea Ching's and our patches applied the Maven2 Release Plugin invoked with the additional arguments mvn release:prepare -DcommitByProject=true and mvn release:perform -DworkingDirectory=.\target\checkout\anything-else -DscmConnection=...host:port:repository:anything-else works for us. The bottom line of our patch is: - avoid incorrect rootProjectPath (compare whole segments only) - create the rootProjectPath if it does not exist (because the working directory is deleted within CheckoutProjectFromScm.execute(...)) - check if the end of the workingDirectory is the beginning of the rootProjectPath and merge them if necessary. These changes do not seem to be related to our particular scenario. > > Another alternative is to manually release the project. > If release:prepare is working for you, then just checkout the > tagged version and run mvn deploy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For > additional commands, e-mail: dev-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org