Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

How do I get clover 3.1.0 to work with Java7 and Maven 3

3 answers

1 accepted

2 votes
Answer accepted
mstudman Atlassian Team Feb 23, 2012

For the information of others, this is resolved in Clover 3.1.3. It was a problem relating to the creation of invalid Java code when instrumenting.

0 votes
mstudman Atlassian Team Jul 27, 2011

Could you please post the contents of CloverTest.java - both the original and the instrumented version found in src-instrumented\test?

I've uploaded the project (pom.xml + CloverTest.java):

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B3knLoA6V2c6MjY4Y2M1ODMtMTRmNS00N2FjLThhMGQtNWYzZDcyNzA0Njgx&hl=en_US

select File->Download Original.

I'm running on a clean Maven 3.0.3/Java 1.7.0 setup. With what I consider is the minimal pom to get the plugin working.

The generated source look fine. But I guess somehow the plugin forgets to set source 1.7

----------------------Original-------------------

package test;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.IOException;

public class CloverTest {

public static void main(String[] args) throws FileNotFoundException, IOException {

try (FileInputStream ff = new FileInputStream("foo")) {

}

}

}

Instrumented version here http://pastebin.com/pCpK6gtY

(Could not press 'comment' if I inserted it directly here)

While JDK is specifically set to 1.7 (<jdk>1.7</jdk>) still experiencing the same issue.

@Sergei: if you're using the latest Clover and still have instrumentation error, it might be related with a source file encoding - see <encoding> parameter for clover2:setup

I'm having the same issue with 3.1.2 and very similar setup. It's interesting to note that the output claims 'processing with source 1.7', but then the compilation seems to change the source type to 1.6. I tried to have a look at the clover2 plugin for Maven, but apparently, it's source has been removed. http://docs.atlassian.com/maven-clover2-plugin/2.3.1/source-repository.html claims it should be in SVN, but the clover directory (https://svn.atlassian.com/svn/public/contrib/clover/) is empty, and browsing around didn't show anything.

Is Clover actively maintained at all? It's a bit scary that things seem to be so out of date with unanswered questions and links pointing into nowhere.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

178 views 2 9
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