Dependencies in Maven have a type element, which defaults to jar , but can be set to ejb , war , ear , etc. The ejb type is a special case because it does not lead to another file termination: ejb still has a final .jar .
I have an ear project where the same dependency is referenced once with the ejb type and once with the jar type (in the transitive dependency tree). Both records request the same file with different Maven "coordinates".
From the point of view of the forcecer plugin dependencyConvergence rule, both dependencies seem different - the dependency version of the <type>jar apparently not controlled by dependencyManagement. However, only one of the dependencies turns it into ear , namely in <type>ejb .
When Maven "lowers" the second addiction and what can I do to influence it?
Please note: I know that you should not have ejb as a jar in your dependency list, but if I kill responsible developers, I can go to jail.
java maven dependency-management
Jf meier
source share