- Install Grails 2.0.4 and set $GRAILS_HOME
- the minimum Grails version required to run the plugin is 2.0.0 (see CloverGrailsPlugin.groovy)
- the compilation and deployment of the plugin is done using 2.0.4 (see application.properties)
- Set JAVA_HOME to JDK 1.6+ (otherwise you'll end up with java.lang.NoClassDefFoundError: org.codehaus.gant.GantBuilder error)
- Clone the repository:
Build and test
To build the plugin and to run unit tests type:
To run integration tests:
Install the artefact
By default maven-install and publish-plugin targets are switching environment context to "production" and our CloverGrailsPlugin.groovy has def environment = ["test"] declared. Therefore you have to force switch of environment context by "grails test ...", otherwise a build fails.
- Test it against the enclosed Grails test applications located in /testcases directory.
Update Clover plugin number in <grails>/testcases/<project>/grails-app/conf/BuildConfig.groovy, e.g.:
Switch to proper Grails version - set GRAILS_HOME and PATH variables according to test project's settings.
Change directory to <grails>/testcases/<project_name> and run
Creating a pull request
In case you'd like to have your changes included in the official release:
- Fork grails-clover-plugin repository and clone the fork into your workstation.
- Implement the change (also write unit or integration tests). Commit changes.
- Create a pull request for grails-clover-plugin project
- Ensure any new features / configuration options are documented in the pull request description.
Release and publish
In case you'd like to build a new release on your own:
You must be a member of the Grails Plug-in Development team:
- register at http://grails.org/register
- get permission to write to the Grails Central release repository; see http://grails.org/Creating+Plugins
- get write permissions in grails-clover-plugin Git repository
- create an account on Grails Wiki in order to edit the http://grails.org/plugins/clover page
add the following in ~/.grails/settings.groovy:
- Increment the version number in <grails>/CloverGrailsPlugin.groovy and commit this, e.g.
def version = "4.3.0"
- Update <grails>/grails-app/conf/BuildConfig.groovy and change the version of
Clover Core required (if necessary), e.g.
core.version = 'org.openclover:clover:4.3.0'
- Build the plugin via:
grails test maven-install
- Test it against the enclosed Grails test applications located in /testcases directory
- Create a tag for new version, e.g:
git tag grails-clover-plugin-4.3.0
and push code changes:
- Push the plugin to Grails Central via:
grails test publish-plugin --plain-output --verbose
- Test that the zip has been pushed to the Grails Central and exists at: http://grails.org/plugin/clover and
is being listed via:
You may have to wait few minutes before it becomes visible; if not - contact email@example.com
- Test that plugin can be installed, e.g.:
grails install-plugin clover 4.3.0
Make sure that clover-X.Y.Z.zip is not available locally in ~/.m2, ~/.ivy2, ~/.grails/X.Y.Z/*, ~/.grails/ivy_cache to check that it indeed downloads from Grails Central and not your cache.
- Update plugin's documentation on http://grails.org/plugin/clover.
Stable releases can be downloaded from Grails Plugins site.