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:build error

Checked out the clover project from bitbucket and performed, executed ant global.build

Here are the errors I'm getting

 

clover-buildutil.build:
[javac] Compiling 4 source files to /home/ksondere/work/clover/clover-buildutil/target/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:3: error: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessorFactory;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:4: error: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessor;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:5: error: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessorEnvironment;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:6: error: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.Filer;

 

 

 

1 answer

0 votes

Hey, you need to JDK 1.6 in order to compile Clover as per developer guide

Ah thanks man, for reasons of my own incompetence I suppose I could not seem to find the guide, thanks

modified maven and java versions as per the developer guide.  Verified the versions via the command line, ran ant global.build and now get this error

[exec] Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
[exec] at java.lang.ClassLoader.defineClass1(Native Method)
[exec] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
[exec] at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
[exec] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[exec] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
[exec] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[exec] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[exec] at java.security.AccessController.doPrivileged(Native Method)
[exec] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
[exec] at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
[exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
[exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
[exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

 

Overstack suggests it's a maven version problem

http://stackoverflow.com/questions/31394456/java-6-unsupported-major-minor-version-51-0

 

However I do have the correct version of maven installed.

 

It simply looks like you're using Maven version which is too new for Java 6. Please take a look at Clover's commons.xml file. When it operates with Maven it calls mvn command. Please verify if it's the Maven 3.2.5, if it's not you can try to run ANT with -Dpath.to.mvn=PATH_TO_MVN325 or simply chaning this file and point this variable to proper path. 

Ah thanks, I tried that and now I'm back to this error even though I'm using java 1.6

Compiling 4 source files to /home/ksondere/work/clover/clover-buildutil/target/classes
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:3: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessorFactory;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:4: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessor;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:5: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.AnnotationProcessorEnvironment;
[javac] ^
[javac] /home/ksondere/work/clover/clover-buildutil/src/com/atlassian/clover/build/codegen/InstrumentationBindingAPF.java:6: package com.sun.mirror.apt does not exist
[javac] import com.sun.mirror.apt.Filer;
[javac]

This generally means, you're actually not using JDK 1.6. Potentially, java -version reports 1.6 since it's in the PATH, but ANT uses different JAVA due to various reasons like JAVA_HOME poiting to different JDK or simillar. 

 

You can also consider using OpenClover tool based on Atlassian Clover. This is an innitiative we started with a friend to keep building Clover in our spare time. There are binaries ready to use (with exclusion of Maven integration since we encountered some blockers). Note, this innitiative is not backed by Atlassian. 

Thanks Grzegorz! OpenClover is what I was actually hoping for :-)  Works great!

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...

146 views 1 8
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