War folder


(antzy.ro) #1

Maven creates an unarchived image of the WAR file in target/- folder. Is there a way to do the same thing in gradle?


(René Groeschke) #2

hi andrei,

to get an explodedWar directory in your build folder, you have to create a custom task of type copy. In that custom task you can reuse the copyspec of the war task:

task explodedWar(type: Copy) {
    into "$buildDir/explodedWar"
    with war
}

regards, René


(antzy.ro) #3

Thanks! it works.