so i have close to 400 ear files i need to convert to gradle. Take this build from one of my simple ones
project('emp') {
apply plugin: 'ear'
dependencies{
deploy project(':emp-jar')
deploy project(':emp-war')
earlib files('libs/com-2.9.0.jar')
earlib group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.21'
earlib group: 'commons-lang', name: 'commons-lang', version: '2.6'
}
}
project('emp-jar') {
}
project('emp-war') {
apply plugin: 'war'
dependencies{
compile project(':emp-jar')
compile files('libs/was8.5/dev/was_public.jar')
compile files('libs/com-2.9.0.jar')
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.21'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
}
}
Now this in itself is fine. Nice and simple. But we have a problem. You see the double entry for the war and the ear projects. While this seems trivial, trust me, any form of double entry is bad in this shop. very very bad. is there a way that i can eliminate this double entry? maybe something like
[compile,earlib] files('libs/com-2.9.0.jar')
in the war or jar project would be ok. If i could figure out a way to annotate the configuration in the war and jar, i could even write a plugin that inserts the dep into the earlib config. in your thinking, take notice that one dependency did not go into the ear.
thanks