You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/04/12 18:45:24 UTC

[GitHub] [maven] famod edited a comment on issue #310: [MNG-6843] - Parallel build fails due to missing JAR artifacts in compilePath

famod edited a comment on issue #310: [MNG-6843] - Parallel build fails due to missing JAR artifacts in compilePath
URL: https://github.com/apache/maven/pull/310#issuecomment-612659076
 
 
   I am also affected by this rather severe bug (see Jira issue [MNG-6843](https://issues.apache.org/jira/browse/MNG-6843?focusedCommentId=17081328&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17081328)).
   
   I had a look at the code involved (before this PR patch) and I do not understand why `MojoExecutor.ensureDependenciesAreResolved()` is setting the `ArtifactFilter` for _multiple_ projects?!
   ```java
           ArtifactFilter artifactFilter = getArtifactFilter( mojoDescriptor );
           List<MavenProject> projectsToResolve =
               LifecycleDependencyResolver.getProjects( session.getCurrentProject(), session,
                                                        mojoDescriptor.isAggregator() );
           for ( MavenProject projectToResolve : projectsToResolve )
           {
               projectToResolve.setArtifactFilter( artifactFilter );
           }
   ```
   The next step after `ensureDependenciesAreResolved()` is the actual execution of the respective mojo via `org.apache.maven.plugin.BuildPluginManager.executeMojo(MavenSession, MojoExecution)`.
   The default implementation (`DefaultBuildPluginManager`) is only operating on a _single_ `MavenProject`, _not multiple_ ones.
   
   Am I missing something, @rfscholte?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services