How to exclude one file from WAR file

not-a-bug

(Blake McBride) #1

My build.gradle includes the following (in addition to other stuff):

war {
    from("src/main/application") {
        into("WEB-INF/application")
    }
}

Along the way, it copies src/main/webapp into the root of the war file. Cool. Problem is I have one file that I’d like it to exclude from that copy. Let’s call it abc.jar. How can I make gradle continue to do everything it’s doing when creating a war file but exclude abc.jar?

Thanks!

Blake