jira-importer commented on issue #108:
URL: 
https://github.com/apache/maven-source-plugin/issues/108#issuecomment-2959535148

   **[Robert 
Golkosky](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rgolkosky)**
 commented
   
   I ran into this same problem when working with the cobertura plugin as well 
and I believe I've traced the problem back to the DefaultLifecycleExecutor and 
the DefaultPluginManager.  The error appears to be triggered when executing a 
mojo which forks the project lifecycle (which is true for both the 
maven-source-plugin and the cobertura-maven-plugin) **and** another build 
plugin has been configured to _not_ be inherited (as is the case with the 
dependency:copy mojo in the attached sample project).  The role of the 
"inherited" attribute in triggering the error can be seen by commenting out the 
declaration in the sample pom, which will enable the build to pass.
   
   What I think is happening is that when MojoExecutions are created by the 
DefaultLifecycleExecutor, the execution configuration is not populated.  In 
addition, when the MavenProject is cloned to be the "executionProject" for the 
forked lifecycle, only those plugins which have inherited == true are copied 
over to the clone by ModelUtils.mergePluginLists().  Thus by the time that the 
DefaultPluginManager is confirming that the mojo is properly configured, you 
have an execution object which was constructed from the original project 
without any configuration elements and it is being evaluated in the scope of a 
cloned project which doesn't include the plugin definition.
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to