You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrey Panfilov (Jira)" <ji...@apache.org> on 2022/08/08 09:52:00 UTC

[jira] [Commented] (MNG-7527) Resolving inter-module dependencies does not work like expected

    [ https://issues.apache.org/jira/browse/MNG-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17576670#comment-17576670 ] 

Andrey Panfilov commented on MNG-7527:
--------------------------------------

[~michael-o]

please find demo project attached

> Resolving inter-module dependencies does not work like expected
> ---------------------------------------------------------------
>
>                 Key: MNG-7527
>                 URL: https://issues.apache.org/jira/browse/MNG-7527
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Andrey Panfilov
>            Priority: Major
>         Attachments: MNG-7527.zip
>
>
> After resolving MNG-4660  ReactorReader ([https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/ReactorReader.java#L220]) tries to pick up packaged main artifact without taking into account what classifier was actually requested:
>  
> {code:java}
> private File determinePreviouslyPackagedArtifactFile( MavenProject project, Artifact artifact )
> {
>     if ( artifact == null )
>    
> {         return null;     }
>     String fileName = String.format( "%s.%s", project.getBuild().getFinalName(), artifact.getExtension() );
>     return new File( project.getBuild().getDirectory(), fileName );
> } {code}
>  
> That new behaviour causes following issues:
>  * if extension of main artifact differs from classifier's (e.g. war/classes) ReactorReader fails to pick up artifact (gh link to demo project: https://github.com/andreybpanfilov/MNG-7527)
>  * if extension of main artifact does not differ from classifier's ReactorReader picks up wrong artifact 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)