A Gradle build-script creates an EAR file with some jars and one war inside. This is all done in Maven before and is now a subject of migration to Gradle.
ENV:
- Gradle 1.12
- Groovy 2.2.1
- Java 1.7.0_60 Oracle
- Eclipse Kepler SR 2
Problem:
... is simple: It works so far - the ear plugin creates the ear file with all module files included from
deploy project(:core)
within the "dependencies" section and the "core-0.0.1.jar" is at ear-root and an module entry has been created in the application.xml. Now I discovered that the runtime libs are not included in the ear file. So I changed (according to docu) the inclusion to
earlib project(:core)
and found the libs within the libs directory as stated in the "libDirName" property from ear plugin configuration. But now there is no module entry within the application.xml AND the "core-0.0.1.jar" is within the libs directory.
Desired
We want the core-0.0.1.jar as a module within the ear root and all runtime libraries within the libs directory - WITHOUT the jar from the module itself! (core-0.0.1.jar is not a war !) Like so...
[APP.EAR]
|--/libs
| |-- log4j.jar
| |-- commons.jar
| |>> app-core.0.0.1.jar <<== NOT !
|
|-app-core-0.0.1.jar <== OK!
|-app-xy-0.0.1.jar
|-app-abc-0.0.1.war
Question
Is this a fundamental lack of understanding of EAR concepts on my side or why does Gradle by itself do not behave the way we want? Or might this little, easy step require a more complex configuration?