关于maven构建的Dynamic Web Module 3.0 requires Java 1.6 or newer 错误

1.该错误是由于maven构建的时候默认用1.5的JDK

2.修改maven的构建在项目的pom.xml的<build></build>标签中加入:

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

猜你喜欢

转载自maple-xf.iteye.com/blog/1988993