This page provides instructions for all available Clover-for-Grails plug-in installation and upgrade options.
The documentation below assumes that you have already installed Grails and have configured your
PATH environment variable to point to the
bin directory of your Grails installation.
There are several ways to install Clover-for-Grails:
Installing the Clover license
Clover requires a license file in order to run. Once you have installed the Clover-for-Grails plugin, you will need to download and install the Clover license file
clover.license. You can generate a 30-day evaluation Clover license file by logging in to https://my.atlassian.com and following the instructions on the site. After 30 days, you need to purchase a commercial Clover license file from this site to continue running Clover. Refer to the instructions below for installing your Clover license file.
Upgrading the Clover-for-Grails plugin is also very easy, as indicated in the procedure below.
Installation of Clover for Grails plug-in
Using the BuildConfig.groovy
Edit your grails-app/conf/BuildConfig.groovy file and add a section like below:
Using the pom.xml
Grails 2.1 has introduced new dependency management based on Maven's pom.xml instead of BuildConfig.groovy file. In order to use this, declare "pom true" in BuildConfig.groovy:
and add dependencies to org.grails.plugins:clover (and com.cenqua.clover:clover) in pom.xml:
Using the 'install-plugin' command
The 'install-plugin' command has been deprecated in Grails 2.1. It's recommended to use BuildConfig.groovy or pom.xml.
If you're using Grails 1.3.7 and earlier, you might need to add a following entry to your list of repositories.
If you experience problems using this method, try installing the plugin directly from its:
z (optional) refer to the latest version of the Clover-for-Grails plugin to be installed.
It's also possible to install it from a downloaded file:
Installing the Clover license file
Once you have obtained your 30 day evaluation or commercial
clover.license file, you need to install it so that your Clover-for-Grails plugin can acknowledge its existence.
You have the following options for installing the Clover license file
Move or copy the
Notes about this option:
The root directory of your Grails project.
This option installs the Clover license file to this Grails project only. You will need to install this file into each of your other Grails projects with the Grails-for-Clover plugin too.
This is similar to the previous option but 'hides' the
Your user home directory.
This will prevent you having to install the Clover license file into every Grails project on your computer as the license file will apply to every Grails project developed on your computer and login account.
Upgrading the Clover-for-Grails plugin
Upgrading the Clover-for-Grails plugin is easy. All you need to do is to 're-install' the Clover-for-Grails plugin by following one of the. During the installation process, Grails will prompt you with a message similar to the following:
Type 'y', then press enter, then Grails will remove the old version of the Clover-for-Grails plugin and replace it with the newer version.
Upgrading Grails framework
Clover-for-Grails only supports the version of Grails indicated on the Supported Platforms page. Hence, if your Grails project has been developed using an older version of Grails, you will need to:
- Download and install a newer version of Grails that Clover supports.
- Update your
PATHenvironment variable to point to the
bindirectory of the newly installed version of Grails.
- Change directory to the root of your Grails project directory.
Run the command:
This upgrades your Grails project to the new version of Grails that you just installed.