It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't Use Clover from Maven

Jim Belton Aug 19, 2012

Your documentation says that clover's maven plugin will automatically download from Maven Central Repository, but I am unable to download the plugin from Maven Central. I see the following error:

[ERROR] No plugin found for prefix 'clover2' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/jbelton/.m2/repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'clover2' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/jbelton/.m2/repository), central (http://repo.maven.apache.org/maven2)]

Is there a way to get this to work? If not, how do I configure my maven scripts to include your repository?

2 answers

0 votes
Marek Parfianowicz Atlassian Team Sep 02, 2012

Hi Jim,

Please note that maven-clover2-plugin has com.atlassian.maven.plugins groupId (and not org.apache.maven.plugins as standard Maven plugins have). Therefore, in order to have 'clover2' resolved automatically by Maven, you must put a following section in ~/.m2/settings.xml file:

<pluginGroups>
    <pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>

See: Clover-for-Maven 2 and 3 User's Guide / Run Clover Without Editing the pom.xml

Regards
Marek

0 votes
Addteq Support Sep 05, 2012

Hi Jim,

When you generate the license, you can click on the link under the license key to download the license-key file. Download it and store it in your home directory. Then, include the full path to your clover license key file.

Next, run the following command, which will generate target/site/clover directories.:

mvn clover2:setup test clover2:aggregate clover2:clover

In pom.xml:

<plugin>
  <groupId>com.atlassian.maven.plugins</groupId>
  <artifactId>maven-clover2-plugin</artifactId>
  <configuration>
    <licenseLocation>/path/to/clover.license</licenseLocation>
  </configuration>
  <executions>
    <execution>
      <phase>pre-site</phase>
      <goals>
        <goal>instrument</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

175 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you