On Github beckje01 / gr8us-2013-plugin-talk
Jeff Beck
beckje01 on GitHub and Twitter
Sr. Software Engineer at ReachLocal
Keep all plugins inside the application directory so they can be checked in with the code.
In BuildConfig.groovy add:
grails.project.plugins.dir="./plugins"
Add a plugin from a local directory.
For each plugin add a line like the following in BuildConfig.groovy
grails.plugin.location.'sanitizer' = "./snapshot-plugins/sanitizer"
// FORKED. grails.plugin.location.'commentable' = "./plugins/commentable-0.7.3" grails.plugin.location.'google-visualization' = "./plugins/google-visualization-0.4.2" // SUBMODULES grails.plugin.location.'ckeditor' = "./snapshot-plugins/grails-ckeditor" // UNMODIFIED. Not in main repository. Installed locally. grails.plugin.location.'image-tools' = "./plugins/image-tools-1.0.4"
grails.plugin.location.'rlapi' = "../../company_plugins/rlapi"
In some build script you get:
if [ -d "$WORKSPACE/company_plugins" ]; then cd "$WORKSPACE/company_plugins/rlapi" git pull origin else git clone -o origin git@git.example.com:company_plugins "$WORKSPACE/company_plugins" fi
Expose the forks and unreleased plugins into a repo, that isn't grails central repo.
In BuildConfig.groovy add the repo
grails.project.dependency.resolution = { repositories { mavenRepo "http://repo.example.org/grails/forks/" } }
Overall for production using the custom repo is the best option currently.
Use inline sparingly during development.
First Identify:
Tend to adding features allowing customization.
Create a repo for each plugin. Run CI.
Why is it unreleased?
Bintray is a hosted solution you can use to host plugins that haven't been published. But no snapshots.
Don't just depend on snapshots.
Come to Groovy.MN