Grails - how to remove log4j from WAR
grails, ivy
Solution
Put this in bottom of BuildConfig.groovy:
grails.war.resources = { stagingDir ->
delete(file:"${stagingDir}/WEB-INF/lib/log4j-1.2.16.jar")
}
Problem
I'd like to remove log4j from WAR built by Grails. My jboss has it already deployed. I was trying: ``` grails.project.dependency.resolution = { ... dependencies { provided 'log4j:log4j:1.2.16' } } ``` But it doesn't work. After a build the WAR still contains log4j-1.2.16.jar. What to do?