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

clover is using java version as 1.4 for some modules

clover is using java version as 1.4 for some modules and 1.8 for some. We have tried setting version in clover-setup property (source="1.8") in build.xml and other workarounds too but no luck. Although if I am putting the source as 1.8 in javac target, it is working fine but that would not be a correct approach.

[clover] Processing files at 1.8 source level.
[clover] Processing files at 1.4 source level.

2 answers

0 votes

What other workarounds have you tried? 

 

What's wrong with setting 1.8 as target source ? Java is mostly backward compatible.

 

I don't think there's an way to tell Clover instrument sources A  with JDK level 4 and sources B with level 8.

The best bet will be to split build process into two parts and compile them in separation. Clover-setup overrides Ant's compiler with its own so I suppose you'd rather would like to use clover-instr target. 

Hi Grzegorz,

I have set up the clover instr setting as below and my build is picking it as well, check below screenshot

<clover-instr source="1.8" srcdir="${src.dir}"
destdir="${build.classes.dir}">
</clover-instr>

[clover-instr] Updating existing database at '/data/jenkins/workspace/nk_em-dcc-adapter/.clover/clover.db'.
[clover-instr] Processing files at 1.8 source level.
[clover-instr] Clover all over. Instrumented 158 files (15 packages).
[clover-instr] Elapsed time = 4.121 secs. (38.34 files/sec, 13,515.409 srclines/sec)

 but still java is processing at source level 1.4, please check below

  [clover] Updating existing database at '/data/jenkins/workspace/nk_em-dcc-adapter/.clover/clover.db'.
   [clover] Processing files at 1.4 source level.
   [clover] /data/jenkins/workspace/nk_em-dcc-adapter/em-dcc-omnetric-adapter/src/com/emeter/dcc/ami/adm/setdevice/ConfigureAlertBehaviourHandler.java:95:2:unexpected token: private
   [clover] /data/jenkins/workspace/nk_em-dcc-adapter/em-dcc-omnetric-adapter/src/com/emeter/dcc/ami/adm/setdevice/ConfigureAlertBehaviourHandler.java:95:2:unexpected token: private
   [clover] ** Error(s) occurred and the instrumentation process can't continue.

 Please suggest further.. thanks

Sorry, but I have troubles reading the snippets you provided, are those 2 separate modules or the same one ? According to the DB location it seems like a single build ?

How do you invoke Ant and how do you invoke Clover within Ant build ?  A snippet including whole Clover-related target would be beneficial.
Generally speaking,  It's a common mistake that people use <ant> or <antcall> to call Clover but don't specify inheritrefs=true, therefore Clover config is lost. 

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