Am 12/12/16 um 00:51 schrieb Igor Fedorenko:
> I'm traveling until next weekend and won't be able to review your changes 
> properly until I'm back. I do want to stress that maven plugins are not 
> dependencies, they are resolved the same way as  projects.

Coming back to this. Currently plugins are resolved the same way as
dependencies. That a direct optional dependency was part of the
resolution result has been a bug in the resolver. Should I update the
core to really resolve plugins the same way as POMs? The easy part of
this would be this change:

+++
b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
@@ -182,7 +182,7 @@ private DependencyNode resolveInternal( Plugin
plugin, Artifact pluginArtifact,
             CollectRequest request = new CollectRequest();
             request.setRequestContext( REPOSITORY_CONTEXT );
             request.setRepositories( repositories );
-            request.setRoot( new org.eclipse.aether.graph.Dependency(
pluginArtifact, null ) );
+            request.setRootArtifact( pluginArtifact );
             for ( Dependency dependency : plugin.getDependencies() )
             {
                 org.eclipse.aether.graph.Dependency pluginDep =

In addition, the plugin POM needs to be resolved in that class as well
and all dependencies from that POM would need to be added to the collect
request. That would make Maven resolve plugins the same way it resolves
projects. Yes or no?

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to