Reputation: 807
I'm using Maven 3.0.4. I have a multi module project, nothing fancy or exotic:
/pom.xml (aggregator pom)
parent/
pom.xml
childA/
pom.xml (inherits from ../parent/pom.xml)
childB/
pom.xml (inherits from ../parent/pom.xml)
There is a trunk/branches/tags at the root level.
All poms have scm sections:
pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk</developerConnection>
</scm>
parent/pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk/parent</developerConnection>
</scm>
childA/pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk/childA</developerConnection>
</scm>
As others have reported here and in multiple bug reports in JIRA, when I do a mvn release:prepare, the tag that gets created is the top level project, but instead of tagging trunk, it's tagging one level up. So the project root looks like:
/
trunk/
branches/
tags/
project-0.0.1/
trunk/
branches/
tags/
There does not seem to be a resolution to this that I have found. The bug reports suggest that it's been fixed in certain versions, then regressions introduced in others. And even the versions it's reported to have been fixed in, some report that it's not.
I've tried v2.0, 2.1, 2.4.1 of the release plugin. I've added a trailing '/' to my scm url at the top level. Nothing helps.
Is there anything obviously wrong with my setup?
UPDATE: So we had no good reason to have the aggregator and parent poms separate, so we combined them and the release plugin works as expected. Still surprised this didn't work because I didn't think this was that exotic of a setup. If the maven guys would like a sample project, I'd be happy to try and come up with one.
Upvotes: 1
Views: 1506
Reputation: 12335
So you're using both an aggregator and a flat multimodule project? It should already work if you release from the parent-folder. Be aware there's no such thing as "tag per project", so the SCM-sections of the childs won't be used. During the release exactly one tag is created based on the executing project. And yes, I'm surprised too if the aggregators pom.xml is directly under trunk.
It would help if you could refer to the JIRA-issues which claim the issue is fixed, because I don't remember a ticket referring to this folder-structure.
Upvotes: 2