So, I'm attempting to build different war files; one for each type of
deployable container (jetty, weblogic, glassfish, jboss, etc.). This is
necessary, as some app servers need additional files, and others need them
excluded.
subprojects
{
configurations {
weblogicAdditionalLibs
jettyAdditionalLibs
}
}
At one point it worked with
task warWeblogic(type: War) {
classpath configurations.weblogicAdditionalLibs
}
when weblogicAdditionalLibs dependencies were added within a different
subproject that this war-constructing subproject depends upon.
Now each subproject truly does get a separate set of configuration objects that
are not shared (probably supposed to be the behavior all along).
Technically this is a "conditional" dependency. Some war files need these
dependencies at runtime, and others do not (and in fact, cannot have them or
they fail).
Is there a recommended way to do this, since my previous attempt no longer
works?
-Spencer