Uhmm, good question! I’ll explain why:
I’m migrating a big Maven project with a lot of dependencies between its modules, and jars, wars, and ears. My current problem, actually, is the behavior of EarPlugin. It provides two configurations, deploy and earlib.
- “deploy” is intended for jar that contains EJBs
- “earlib” is intended for dependencies of those EJBs (if I understand it correctly).
So my “core” dependency actually produces a Jar with EJBs inside, that depends upon a lot of libraries and other projects.
I was trying, then, to do the following:
earlib project(path: ':core', configuration: 'runtime')
If I do that, the “earlib” configuration will bring all runtime dependencies and artifacts from “core”.
Instead, if I do something like:
earlib project(path: ':core', configuration: 'compile')
Then “earlib” will only depend on the “compile” dependencies of “core”, but wont depend on “runtime” only dependencies.