I have the following multi project setup:
earProject (ear) ----projectA (java) --------dependency1 --------dependency2
the earProject has the ear plugin applied, and should produce a .ear file. ProjectA is a java project producing a .jar.
Now, when I try to include projectA in my ear I run into issues with my transitive dependencies:
deploy project(":projectA") } // projectA in root of ear, but no libs deployed, dependency1 & dependency2 missing in lib/
earlib project(":projectA") } // dependency1 & dependency2 now in lib/ - but projectA.jar deployed in both root and lib/
How do I deploy projectA.jar in the root, but all its dependencies (which are not in the deploy configuration) in lib/ ? Currently I have a very dirty hack that iterates the dependencies of the earlib configuration to look for all that are not in the deploy configuration, but this seems wrong. Am I missing something, or isn’t this something a lot of multi-project builds would run into? Is there some correct way of handling this issues that I am simply not seeing?