Am 12/19/16 um 03:39 schrieb Christian Schulte:
> Am 12/18/16 um 10:19 schrieb Hervé BOUTEMY:
>  You know what? We want also that libraries classpath are consistent
> when built
>> and when used as dependencies: nothing specific to plugins and core 
>> extensions. 
>> Everything is built some time then used.
>> If there are some unexpected discrepencies, we have an issue.
> 
> That may well be! You can take
> <https://issues.apache.org/jira/browse/MPLUGIN-296> as an example
> demonstrating the difference. You just need a maven-plugin project to
> build using the maven-plugin-plugin-3.4. Build that with Maven < 3.4 and
> Maven >= 3.4 and compare the different plugin classpaths (-X). You'll
> notice that in Maven 3.4 a provided direct dependency of the plugin is
> collected and used to do conflict resolution and everything else and
> then filtered out during resolving the artifacts. In Maven < 3.4 that
> provided direct dependency is not collected and so another node (same
> dependency but transitive) is used to do conflict resolution and
> everything else which is then not filtered out during resolving the
> artifacts. Maven 3.4 gets that right. Maybe that's also the way
> dependencies should be resolved as well.

Maven 3.4 (project): <http://pastebin.com/tuc1TncQ>
Maven 3.0.5 (dependency): <http://pastebin.com/W4fJd93B>

Note that 3.4 collects direct 'test', 'provided' and 'optional'
dependencies whereas 3.0.5 does not. In 3.4 the conflict resolver selects

[DEBUG]
org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.4:provided

(nearest) whereas in 3.0.5 the conflict resolver selects

[DEBUG]
org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.4:runtime

because the nearer provided dependency has not been selected during
collecting dependencies. This result is passed to the resolver to
download the corresponding artifacts (jars). That resolver is setup to
filter out anything non-transitive ever since but it never saw anything
non-transitive due to the collector not collecting the nodes.


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

Reply via email to