War Plugin - is it possible to do "free form" manipulation of the war contents before it gets zipped up?


(mmichalek) #1

Hi, I’m wondering if there’s a point in the war plugin lifecycle where I could operate on the pre-zipped contents of the war directly. I’m picturing something like being able to manipulate the contents of the war in a temp directory, before they are zipped up into the war file.

A use case might be that I have a pre-existing ant script that renames jars within the war structure. Is there a point in the gradle build where I could run such an external script and have those changes reflected in the final war file?

Thanks, Mark


(Peter Niederwieser) #2

By default, the War task brought in by the War plugin will pull in pieces from their “original” locations. As such, there isn’t one place in the file system where you could manipulate them. What you could do is to reconfigure the War task to pull in (say) libs from a particular directory. This would give the Ant script a chance to manipulate them.


(mmichalek) #3

Thank you Peter, that is helpful. Is this something that would make sense as a feature request or is it totally contrary to the nature of the plugin? Even if this was available at the very last step, that would be fine for my purposes.