You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2016/01/27 01:43:39 UTC

[jira] [Closed] (MNG-5475) [REGRESSION] repo and pluginRepo with different id's prevent resolution of common parent POM

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

Christian Schulte closed MNG-5475.
----------------------------------
    Resolution: Fixed

Issue is not reproducible using

{code}
Apache Maven 3.4.0-SNAPSHOT (5c98a4261f7e50ee0197902c5737ebfc0acac724; 2016-01-26T02:49:41+01:00)
{code}

Looking at MNG-5163, the plugin repositories have not been used in Maven < 3.0.4. There also is MNG-5149 correcting a repository id issue in 3.0.4.

I guess the issue has been solved in Aether. Maybe the Aether bugzilla contains a corresponding entry.

Please re-open, if the issue still exists.

> [REGRESSION] repo and pluginRepo with different id's prevent resolution of common parent POM 
> ---------------------------------------------------------------------------------------------
>
>                 Key: MNG-5475
>                 URL: https://issues.apache.org/jira/browse/MNG-5475
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.0.4, 3.0.5, 3.1.0-alpha-1
>         Environment: OS X (10.8.3), JDK 1.6
>            Reporter: John Casey
>            Priority: Critical
>         Attachments: repo-id-squash.zip
>
>
> I have a settings.xml file with an activated profile that lists one repository and one pluginRepository, both pointing at the same repo (on disk) BUT using different repository id's.
> In this repository, I have deployed a parent POM and a plugin. The plugin lists the parent POM as its parent.
> I also have another jar project that uses the parent POM as its parent, and uses the plugin during its build.
> NOW:
> When building with Maven 3.0.3, the jar project build completes correctly. But, when I build with ANY VERSION AFTER 3.0.3 (3.0.4, 3.0.5, 3.1.0-alpha-1 from March 30th, io.tesla.maven.apache-maven 3.1.2...even though that's not part of Apache Maven at all) IT FAILS.
> The specific failure is that it cannot find the common parent POM as it's trying to resolve the plugin. Looking closely at the build logs, you can see Maven resolve the parent POM using the non-plugin repository, and update _maven.repository (I've verified that this non-plugin repository's id is stored here). Then, Maven tries to resolve the plugin POM, sees that the parent POM is in the local repository and isn't set to be updated yet. So, it tries to verify that that parent POM is available via the plugin repositories it knows about...which is where _maven.repository seems to come in. It has the wrong value, and causes Maven to discard the locally cached parent POM.
> So, Maven won't update this parent POM in the local repo, but refuses to use the one that's there because it came from the wrong place.
> It seems like Aether is not smart enough to understand that the two repositories are the same, even though the repository-id is different. I suspect this could lead to VERY strange-seeming errors if two projects referenced the same parent POM and repository URL but with different repo-id's.
> I'm attaching a test case. It contains the repository with the parent POM and the plugin, along with the source projects for each. It also contains the jar project (bar-child) which has a settings.xml file in it. Finally, in the bar-child/ directory you'll find build-*.log files corresponding to each attempt I made with different Maven versions. The root directory is: 
> repo-id-squash/
> NOTE: If you want to run the test case, you'll need to modify the paths in the bar-child/settings.xml since they're currently specific to my filesystem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)