[ 
https://issues.apache.org/jira/browse/MENFORCER-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Heinz Marbaise closed MENFORCER-231.
-----------------------------------------
    Resolution: Won't Fix
      Assignee: Karl Heinz Marbaise

So maybe I misunderstand a thing here but based on the original attached zip 
file containing the example If I run: {{mvn clean}} on the root level I get 
(Commented out maven-enforcer):
{code}
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:child-1:[unknown-version]: 
Failure to find com.example:root:pom:1.1-SNAPSHOT in 
http://localhost:8081/nexus/content/groups/public was cached in the local 
repository, resolution will not be reattempted until the update interval of 
nexus has elapsed or updates are forced and 'parent.relativePath' points at 
wrong local POM @ line 4, column 11
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.example:child-1:[unknown-version] 
(/Users/kama/Downloads/menforcer-231/child1/child-1/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for 
com.example:child-1:[unknown-version]: Failure to find 
com.example:root:pom:1.1-SNAPSHOT in 
http://localhost:8081/nexus/content/groups/public was cached in the local 
repository, resolution will not be reattempted until the update interval of 
nexus has elapsed or updates are forced and 'parent.relativePath' points at 
wrong local POM @ line 4, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] 
http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
{code}
The problem is simply Maven tries to read the whole reactor. Reading the 
child-1 it identifies that the parent defined in {{child-1}} does not exists 
and will fail cause it can't be found. What you can also see that Maven tries 
to resolve that parent from the remote repository...

Before Maven 3.3.9 the behaviour was simply wrong not to resolve the parent 
from the remote repository in such cases. See the [Release 
Notes|http://maven.apache.org/docs/3.3.9/release-notes.html] more in detail 
MNG-5840.

How you can reproduce this:
 * Change the version of the parent pom to {{1.1-SNAPSHOT}}
 * {{mvn install -N}} on root level
 * Change the version of the parent pom back to {{1.0-SNAPSHOT}}
 * {{mvn validate}} and you will get the correct error message from 
ReactorModuleConvergence.

Based on that I will close the issue. If you have further details don't 
hesitate to reopen the issue.

> Reactor Module Convergence doesn't work when relativePath is set
> ----------------------------------------------------------------
>
>                 Key: MENFORCER-231
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-231
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>    Affects Versions: 1.4
>            Reporter: Daniel Roig
>            Assignee: Karl Heinz Marbaise
>         Attachments: menforcer-231.zip
>
>
> When setting version to X in the root pom of a multi-module build and version 
> Y in a child pom and the child pom specifies a correct {{<relativePath>}} tag 
> in the parent section of the child pom, Maven will not fail the build. 
> I tried invoking {{mvn validate}} from the root and it reported that the 
> build succeeded. However, if I remove the {{<relativePath>}} from the parent 
> section, the enforcer rule correctly reports that the module build is 
> incoherent.
> Moreover, if I invoke {{mvn -pl :sub-module validate}} _with_ the 
> {{<relativePath>}} reinserted, it will again correctly report an incoherent 
> build.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to