I am a grails programmer and I want to remove the unnecessary jar files that are included in the war file. There are so many unnecessary jar files included in the war file. Is there any quick solution to do so? Also can you mention the jar files which are necessary to make and run the simple grails war.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can exclude unnecessary jar from war by adding following lines in BuildConfig.groovy.
grails.war.resources = { stagingDir ->
delete(file:"${stagingDir}/WEB-INF/lib/jarFileName.jar")
}
Example : Removing hibernate core
grails.war.resources = { stagingDir ->
delete(file:"${stagingDir}/WEB-INF/lib/hibernate-core-3.3.1.GA.jar")
}