Why do you say Dependency A is transitive? Maven plugin directly depends on Dependency A, so I expect it to be present on the plugin classpath. This is consistent with how project direct optional dependencies are always present on classpath.
Note that the project does not *depend* on the plugin. From dependency resolution point of view, the plugin is standalone "top-level" entity at the same level as the project. -- Regards, Igor On Sat, Dec 10, 2016, at 06:26 PM, Christian Schulte wrote: > Am 12/10/16 um 13:39 schrieb Hervé BOUTEMY: > > I just tested the patch associated to MNG-6110 - Upgrade Aether to Maven > > Resolver 1.2, and it caused one failure in ITs > > testit(org.apache.maven.it.MavenITmng4721OptionalPluginDependencyTest) > > Time > > elapsed: 0.185 sec <<< FAILURE! > > junit.framework.AssertionFailedError: expected:<1> but was:<0> > > > > Is it only me? > > No. If you take a look at MNG-4721, it's not quite clear what that test > case is testing. I verified the resolver is behaving correctly. That is > - it correctly does not resolve any plugin dependency with optional set > to 'true'. Here is the difference: > > Maven with the Resolver < 1.2.0: > > maven-plugin > |-> optional dependency A > |-> optional dependency B > > Dependency A will be resolved, although an optional transitive > dependency. Dependency B will not be resolved and that is correct, > because it also is an optional transitive dependency. > > Maven with the Resolver >= 1.2.0: > > maven-plugin > |-> optional dependency A > |-> optional dependency B > > Dependency A is no longer resolved because it is a transitive optional > dependency. That's the bugfix due to MRESOLVER-8. That IT should just be > updated to no longer run with Maven 3.4+ and a new one created running > with 3.4+ testing the correct behaviour. It only affects optional plugin > dependency resolution which isn't quite right in the resolver < 1.2.0. > Will do that. > > > Fixing MNG-6110 is the first step before doing more changes, IMHO > > I've just committed this to master now. > > Regards, > -- > Christian > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
