[
https://issues.apache.org/jira/browse/MNG-5840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574303#comment-14574303
]
Stephen Connolly commented on MNG-5840:
---------------------------------------
Some people asked on the mailing list for a better description of what the test
case is trying to show.
There is a common (to me at least) case where you have multiple GIT projects
that are all related and expect to be checked out in a standard structure (you
might even have a "helper" project that checks all of these out with scripts or
submodules and perhaps an aggregator pom.xml in the root)
So to let you work on the bleeding edge of the multiple modules and not pollute
your local repository, you use <relativePath> to link up all the different
projects.
Now what happens while you release each of these GIT roots one by one?
The parent root goes from {{1-SNAPSHOT}} to {{2-SNAPSHOT}} (note that we have
never run {{mvn install}} on the parent while it has a {{-SNAPSHOT}} version
because we do not want to pollute the local repo.
To release the child, it must use a non-SNAPSHOT version, and since we have
released version 1 we just update the version to 1 (e.g. {{mvn
versions:update-parent versions:commit}}) only with 3.3.1 and 3.3.3, unknown to
you, you are actually building the child with the {{2-SNAPSHOT}} parent. If
there were any changes made to that pom that affect the build (e.g. changing
dependency versions, plugin defaults, etc)... especially if child produces an
aggregate artifact (e.g. a WAR) good luck trying to reproduce that build.
Things get even worse if you have to switch the child back to a maintenance
branch to cut a patch release as now you are resolving the parent from master
which could well be completely different.
> <relativePath> is used if the groupId and artifactId match irrespective of
> the version
> --------------------------------------------------------------------------------------
>
> Key: MNG-5840
> URL: https://issues.apache.org/jira/browse/MNG-5840
> Project: Maven
> Issue Type: Bug
> Affects Versions: 3.3.1, 3.3.3
> Reporter: Stephen Connolly
> Assignee: Stephen Connolly
> Labels: regression
> Fix For: 3.3.4
>
> Attachments: mng-5840-testcase.tar.gz
>
>
> This is a regression. (In my view a serious one)
> Works fine with Maven 3.0 through 3.2.5
> Fails with 3.3.1 and 3.3.3
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)