November 2nd, 2011

Make Eclipse always use default java

Uncategorized, by Moby.

The m2eclipse plugin doesn’t use Eclipse defaults, the m2eclipse plugin derives the settings from the POM. So if you want a Maven project to be configured to use the latest version of Java when imported under Eclipse, configure the maven-compiler-plugin appropriately:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>2.1</version>
  <configuration>
    <source>1.6</source>
    <target>1.6</target>
  </configuration>
</plugin>

Via: http://stackoverflow.com/questions/3539139/what-causes-a-new-maven-project-in-eclipse-to-use-java-1-5-instead-of-java-1-6-b

Back Top

Responses to “Make Eclipse always use default java”

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Back Top