So I wish to create a docker container from my Java 6, Maven project. I tried a whole bunch
http://search.maven.org/#search%7Cga%7C1%7Cdocker%20maven%20plugin
but everyone failed with either a
Unsupported major.minor version 51.0
or
Unsupported major.minor version 52.0
Is there any plugin that still supports Java 6 out there? Or is there another way to use a maven plugin to achieve the same goal?
How about you build it with your project itself. You might have to work out the dependencies.
https://github.com/rhuss/docker-maven-plugin
Related
folks!
I have 2 separate servers on Linux for Jenkins and Sonarqube. The code is written in Java 1.8 and can be compiled using Jenkins. Everything works fine.
It fails at the SonarQube step because our SonarQube uses Java 11, and it fails with this error.
ERROR: Error during SonarScanner execution java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
How can I fix this?
You have to run the sonar scanner with at least Java 11, no matter what version of Java your application supports.
Two years ago I had a similar issue. I don't know if your app and sonarqube should run on the same machine (as it was in my case).
If yes, just install both versions of java and set the path of Java 11 to SonarQube settings.
According to sonarqube community, you should do the following:
Edit conf\wrapper.conf, specifically the wrapper.java.command to following:
wrapper.java.command=C:\Program Files\Java\open jdk-11.0.2\bin\java
#wrapper.java.command=java
I am trying to insert sonarqube setup on build.xml, getting unsupported error.
My build Java version support 1.6
Ant.sonar.qube support 2.5
If I use have version 1.8 my ant sonar command is working.ant command is not working.if I use java 1.6 ant is working and ant sonar is not working.
You already know exactly what your problem is:
If I use have version 1.8 my ant sonar command is working
...
if I use java 1.6 ant is working and ant sonar is not working.
You're facing incompatibility with the version of Java you're trying to use. Since analysis will not work with 1.6, you're best off upgrading to Java 8 and working to make whatever your other Ant target is work with that.
This is driving me nuts.
When running any ant command (even ant -version), I always get the following error on Mac OSX:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
I removed and re-installed ant entirely, and still get the same error.
For our company we have to run Java7 to run the command, so I created an alias.
This used to work, I'm not sure what changed.
I see you have java 1.7 installed and post that you have installed Ant 1.10.
Ant 1.10 requires jdk 8
Refer : http://ant.apache.org/
The Apache Ant team currently maintains two lines of development. The
1.9.x releases require Java5 at runtime and 1.10.x requires Java8 at runtime. Both lines are based off of Ant 1.9.7 and the 1.9.x releases
are mostly bug fix releases while additional new features are
developed for 1.10.x. We recommend using 1.10.x unless you are
required to use versions of Java prior to Java8 during the build
process.
Try using Ant 1.9.x if you can't use java 8
Here is a list of minimum java version for given ant version
I have a project that build with ant 1.9.4 and java 1.8.0_121 on machine A using Jenkins. But if I move the same project to a machine with the same versions of Ant and Jenkins but with java 1.8.0_131, my build fails.
Is there a way to make an ant build succeed with any Java 8 version without installing a different version of Java 8?
Thank you!
Since I am on a Linux RHEL, I had to increase the memory size configuration for JiBx in the /etc/security/limits.conf file.
I am using ant script for Sonar code scan .Currently with 'sonar-ant-task-2.2.jar' i am able to execute scan for Java 7.
With Java 8 which version of sonar-ant-task need to be used ?
Thanks & Regards
Ganesh Rao
Read point #2 of Prerequisites at documentation. Use At least the minimal version of Java supported by your SonarQube server is in use.
See this, any JRE v8 will do.
If you have a look at the documentation of the latest scanner you will find this Prerequisites section:
SonarQube is already installed
At least the minimal version of Java supported by your SonarQube server is in use
The language plugins for each of the languages you wish to analyze are installed
You have read Analyzing Code Source.
Ant 1.7.1 or higher
So using Java 8 is not a problem if you are using SonarQube 5.6+ and using the latest scanner will resolve some issues (see the changelog).