I was asked to remove any images duplicated in the war file into which the grails application is packaged. The documentation suggests that this is possible using a property grails.assets.excludesin Config.groovy, but it does not clearly indicate how this property should work.
Here is what the documentation says:
Optionally, assets may be excluded from processing if they are included in your requirements tree. This can significantly reduce the compilation time of your assets. To do this, simply use the excluded configuration option:
grails.assets.excludes = ["tiny_mce / src / *. js"]
This example is completely unclear to me. I tried several permutations of this expression without success; imaginative assets are still being pre-processed, causing duplicates of all of them in the resulting war file. Here are some settings I tried:
grails.assets.excludes = ["tiny_mce/src/*.jpg", "tiny_mce/src/*.jpg"]
grails.assets.excludes = ["<app_name>/src/*.jpg", "<app_name>/src/*.jpg"]
grails.assets.excludes = ["/images/*.jpg", "/images/*.png"]
grails.assets.excludes = ["**/*.jpg", "/images/**"]
What am I missing? How do I tell an asset pipeline to skip precompiling images?
source
share