Overwrite files when creating a JAR or WAR archive


(Christopher Molozian) #1

I’ve got the following snippet of code that’s including branding information for my web application project:

tasks.war {
    archiveName = "${brand}-${archiveName}"
    from { files(brandDir) }
}

It works well, except that I’d like my branding resources (icons… etc) to overwrite those that are bundled with the application in the “src/main/resources” folder. At the moment the files are actually packaged alongside each other in the WAR archive.

How do I specify that the files from the brand directory should overwrite files with the same name?


(Stig Kleppe-Jørgensen) #2

This is a bug; look at GRADLE-1454 for more info