If I create new Maven
project in Eclipse
and base it on quickstart archetype, it appears with J2SE-1.5
in Java Build Path
window and 1.5 in Java Compiler / JDK Compliance
window.
So, I usually have to change this to other Java manually.
Where are these default setting come from?
How to change to 1.6 or 1.7?
You will have to manually update the pom.xml with the following plugin because 1.5 is the default.
Refrences:
Eclipse JRE System Library [J2SE-1.5]
Eclipse + Maven: force Execution Environment "JavaSE-1.6" instead of fixed JDK
The m2eclipse plugin uses the settings from the POM. So you need to add this to your POM:
You should add plugin in your pom.xml like below :
And then you can see your project marked with error.In this case, Right click your project directory->Maven->Update Project option will work