anschoewe wrote:
Thanks for your help. That got me started in the right direction and I was
able to figure it out.
We want to do this because this web app, when deployed, will share many of
the common jars with other web apps running in the same instance of Tomcat
-only a few are unique to this web app. This way, we don't need to
duplicate jars in the web server.
Right. Now it makes sense.
However, this then made me wonder how I can switch between this custom war
bundling, and the generic war bundling where all the jars are thrown into
one war. Is there an easy way to change configurations based on the task
passed in at the command line? For instance, I would like execute 'gradle
war' to do the generic bundle-all war.
This is the default, so you can leave the 'war' task as it is. Each
additional War task you add to a project is initially configured exactly
the same way as the 'war' task. You can then tweak the configuration to
suit. So, your build can have a number of different War tasks, each of
which produces a slightly different WAR. For example:
usePlugin 'war'
task splitWar(type: War) {
// include only the project dependencies (from previous example)
// might also change the destination dir, or the war name, eg
// classifier = 'split' or customname = 'split.war'
}
You can run gradle war to produce the standard war file, and gradle
splitWar to produce the split war file.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email