Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ, Maven and Java 7

So I opened an existing project in IntelliJ 10.5 as a maven project. I had first added the JDK 7 to my list of SDKs in order to try out the features. However for some reason my mvn commands would fail, so I switched the maven runner back to 1.6. But I'm getting a weird error where some maven commands are still being run with Java 7.

In the Maven Projects view when I right click on a lifecycle in the module and select Run Maven Build everything works correctly, however when I select Run " clean" it still uses the 1.7 JDK. I have removed the JDK 7 from my list and now I get an error saying it can't find JRE '1.7'.

I honestly have no idea how to fix this, but if anyone has any suggestions that would be great.

like image 881
Mike Avatar asked Aug 04 '11 19:08

Mike


1 Answers

In the Maven Projects panel press the Settings button (or open Settings | Maven | Runner).

Make sure that JRE is set to the existing JRE configuration (1.6).

like image 184
CrazyCoder Avatar answered Oct 01 '22 00:10

CrazyCoder