Search This Blog

m2eclipse: use java 1.6 instead of 1.5

m2eclipse uses java 1.5 by default. To make your project use java 1.6. you need to edit your pom.xml file:
<project>

        ... ...

    <build>
        <plugins>
            <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>
        </plugins>
    </build>
</project>

then right click your project in eclipse, select Maven -> Update Maven Project.

No comments:

Post a Comment