[MASSEMBLY-869] Spurious dependency when profile is disabled
Olivier Cailloux opened MASSEMBLY-869 and commented
My assembly descriptor contains a dependency set entry, that supposedly should include all dependencies for my project and nothing more, namely, only one dependency in my case. But two dependencies get included.
My project uses profiles. The profile configures a “bcprov” property, which determines the (sole) dependency of my project. Under the “swt-unix” profile, this should be org.bouncycastle:bcprov-jdk15on:1.57, while under the “swt-windows” profile, this should be org.bouncycastle:bcprov-jdk14:1.57.
But running mvn -P '!swt-unix,swt-windows' package includes both org.bouncycastle:bcprov-jdk15on:1.57 and org.bouncycastle:bcprov-jdk14:1.57 in the “test-dep-0.0.1-SNAPSHOT-runnable-windows.zip” artifact produced by the assembly.
The problem seems related to the “swt-unix” profile activation section.
Please see GitHub and Travis to see the issue at work with some debug information (the dependency plugin shows that the correct dependencies seem to have been computed, and the manifest includes the correct classpath entry, yet the dependencies included in the artifact are incorrect).
Affects: 3.1.0
Attachments:
- pom.xml (2.05 kB)
- Runnable.xml (698 bytes)