[Closed] (MNG-6460) Maven resolves old snapshot jars when an artifact changes from jar to pom deployment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Closed] (MNG-6460) Maven resolves old snapshot jars when an artifact changes from jar to pom deployment

Robert Scholte (Jira)

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

Michael Osipov closed MNG-6460.
-------------------------------
    Resolution: Incomplete

No reaction for two years for the questions given.

> Maven resolves old snapshot jars when an artifact changes from jar to pom deployment
> ------------------------------------------------------------------------------------
>
>                 Key: MNG-6460
>                 URL: https://issues.apache.org/jira/browse/MNG-6460
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.5.0
>            Reporter: Andy Grove
>            Priority: Major
>
> I have two projects, A and B.
> A started out as a simple project with single pom with jar packaging.
> B had a dependency on A.
> A was refactored to be multi module where each module has jar packaging. The parent pom now has pom packaging.
> After building A and deploying new artifacts to artifactory, and making changes to B's pom I saw compilation errors with references to to the old A and the new A.
> I eventually realized that B still had a reference to the original artifact from A (which was originally had jar packaging but now has pom packaging).
> Even though the latest snapshot for the parent pom in A was correctly published with pom packaging and no corresponding jar file, the maven-dependency-plugin was resolving the jar file from the previous snapshot release from before the refactor.
> This seems like a bug to me. It should have looked at the pom for the latest snapshot and seen that it had pom packaging and then failed to resolve the jar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)