I have a the following gradle project structure
project-ear project-a project-b
Project-a - generates a jar as final artifact - has dependencies on some local files.
compile files('lib/filea.jar') compile files('lib/fileb.jar') compile files('lib/filec.jar') compile files('lib/filed.jar') compile files('lib/filee.jar')
On the ear project - where I assemble the final ear - I have the project-a referenced as a earlib dependency.
As you all might know, all compile dependencies from project-a, get automatically inserted into the APP-INF/lib directory. However, I’d like to exclude only “filea.jar” from this list, which means that having “transitive=false” in the earlib entry is not an option. Any idea how I could exclude filea.jar from my final artifact?