Grails resources plugin that hooks into the Distribution phase to publish static content
Shell Groovy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status

Static Content Distribution

This plugin hooks into the Grails Resources pipeline at the Distribution phase so that the bundled and/or minified content is ready to be distributed. At the time of writing, it only supports copying the content to a directory (so that Apache can serve it out), but more distribution mechanisms will come in the future. There are some known issues at the moment.



This plugin is hosted on Grails Plugins Central so add it to your BuildConfig.groovy file as follows:

plugins {
    compile ':static-content-distribution:0.1'


The plugin is enabled by default, but for it to work, you must configure a directory for the plugin to distribute the content to. If this configuration is not present, the plugin will do nothing. = '/directory/to/distribute/content'

As mentioned the plugin is enabled by default, to disable it setup the following:

grails.resources.mappers.staticcontent.enabled = false

Known Issues

There is a current issue with this plugin working with the zipped-resources plugin. Due to the fact that the zipped resources compressing the content, this plugin will only get the gzipped file, rather than the original. The web server will then be unable to serve out the original file (without the .gz file extension), and it will fail. The current work around is to disable the zipped-resources plugin if you want to use this plugin.