Error running Maven goal 'compile' from Selena

I get the following error message when trying to run maven out of Selena (7118):
Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6

Maven 2.0.5 is used, and the build works fine if run from the command line.


The same problem still exists in Selena M2:
Project compilation fails when Maven compile is invoked from Selena, but works using the same Maven from the command line.

I attached the console output with level


Hi Tobias,

It seems Maven is run under JDK 1.5 when you're invoking it from Selena. Are you sure your project is set up with JDK 1.6?

One thing you could try, is to change from using the embedded to the external version of Maven in the Build tab of the Maven configuration. There you can manually choose which JDK version to run with.

Stig Kleppe-Jørgensen


Thank you for the hint, it actually works when using external Maven.
Selena should be able to compile JAVA 6 code even when using embedded Maven though!


I guess you meant that MAVEN should be able to compile Java 6 code when using embedded Maven, and not Selena?

Because if Selena cannot compile the code, you probably aren't using JDK 6 inside Selena for your project. And as embedded Maven is using the same JDK setup as Selena, it won't be able to compile either.

Stig Kleppe-Jørgensen


I am using JDK 6 in Selena and I also have the necessary configuration for the compiler plugin included in the poms.
Selena does compile the project, Maven compiles it when run from command line and when run by Selena as "external Maven".
IMHO it's a Selena problem, that Maven can't compile when used embedded: the only thing not running under Java 6 is Selena after all.

Are there any plans to change to a bundled JRE6 for Selena?


Please sign in to leave a comment.