We are using various plugins in our grails application (like logging, spring security core, ui, acl and many others). Now these plugins come with default gsps (in the views folder of each plugin).
I want to build a WAR without including the views of any plugin. So when the war is built right now it creates the plugins folder which contains views folder which come by default with the plugin, these views are introducing a lot of vulnerabilities and so I want to exclude the plugins views.
I am trying this right now in BuildConfig.groovy like below:
grails.project.dependency.resolution = {
grails.war.resources = { stagingDir ->
println "Customized delete started..."
delete{fileset dir: "${stagingDir}/WEB-INF/plugins/logging-0.1/grails-app/views/"}
delete{fileset dir: "${stagingDir}/WEB-INF/plugins/spring-security-ui-0.1.2/grails-app/views/"}
}
}
But the problem is the code tries to delete the views when they are not yet created by the war building process. Hence I get a file not found error for those plugins views.
Where should I write the code to delete the plugins views so that they are already created and available to delete when building the WAR, or how do I not include the plugins views in the WAR?
Thanks in advance.. Priyank