I am facing a problem on copying some messages.properties before the war generation, in my Grails application, I am doing it by putting the following code in my 'BuildConfig.groovy' file like THIS documentation shows :
grails.war.resources = { stagingDir, args ->
copy(file: "grails-app/conf/custom-web.xml",
tofile: "${stagingDir}/WEB-INF/web.xml")
}
In this snippet the web.xml is been copied but in mine application I am copying a .propertie file used in some Jasper reports, my code is like bellow:
copy(TODIR: "${stagingDir}/WEB-INF/classes/grails-app/i18n") {
fileset(dir: "grails-app/i18n")
}
When i open the resulted files it is everything OK (no character problems) but when i generate the report the special character like '^', '`', 'รง', etc. I have character encode problems. I tried to set UTF-8 in my tomcat server but it does not works too. When I copy the files manually, when the app is already deployed to tomcat, and replace it with the copied by code above IT WORKS. Any idea?
Thanks in advance!!