Solving “Dynamic Web Module 3.0 requires Java 1.6 or newer” in Maven Projects

转载 2015年07月08日 12:55:35

When you’re creating a project with Dynamic Web Module 3.0 support, you should be using Java 1.6 or newer. I’ll be fixing this issue with Java 1.7, using Eclipse.

The “Markers” tab will be showing the next error:

Dynamic Web Module 3.0 requires Java 1.6

First check that your project is configured probably to use Java 1.7.
Right click your project > Properties > Java Compiler and set “Compiler compliance level” to 1.7.

Eclipse Project Java Compiler

Next from the menu on the left select Project Facets > Java and set its version to 1.7

Eclipse Project Java Compiler

If you didn’t find 1.7 as one of the drop down options in the previous preferences, then you have to add it to eclipse first.
Navigate to eclipse Preferences > Java > Installed JREs, click Add, and locate your installed Java path.

Adding Java in Eclipse

Open your project’s pom.xml and add this plugin tag

1
2
3
4
5
6
7
8
9
10
11
12
13
<build>
    <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
            <source>1.7</source>
            <target>1.7</target>
        </configuration>
    </plugin>
    </plugins>
</build>

或者 在setting.xml 增加

<profile>
            <id>jdk-1.7</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.7</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.7</maven.compiler.source>
                <maven.compiler.target>1.7</maven.compiler.target>
                <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
            </properties>
  </profile>


Finally, right click on your project > Maven > Update Project…

This solution was tested using: Java 1.7Maven v3.1 and Eclipse Kepler on Mac OSX Lion.

相关文章推荐

Solving “Dynamic Web Module 3.0 requires Java 1.6 or newer” in Maven Projects

Solving “Dynamic Web Module 3.0 requires Java 1.6 or newer” in Maven Projects

Solving “Dynamic Web Module 3.0 requires Java 1.6 or newer” in Maven Projects

Solving “Dynamic Web Module 3.0 requires Java 1.6 or newer” in Maven Projects

Maven异常:Dynamic Web Module 3.0 requires Java 1.6 or newer.

问题 我目前用的JDK 是java 1.8 ,搭建Maven项目的时候,设置Project facets后,出现来以下problem : Dynamic Web Module 3.0 requires...

解决“Maven项目中的Dynamic Web Module 3.0 requires Java 1.6 or newer”问题

错误描述 当创建有动态web模块3.0支持的项目时,需要用到Java版本不低于1.6。 在Markers标签页中显示的错误为:Dynamic Web Module 3.0 requires Java ...

Eclipse Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案

Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Location TypeDynamic Web Module 3.0 r...

解决 "检出Maven项目web.xml is missing"错误 和 “Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误

错误1: 从SVN检出项目时,项目报错web.xml is missing 错误如图所示: 解决方法: 发现他好像没有找到web.xml 然后在 properties 的Deployment...

eclipse 中 maven项目 改为dynamic Web Project 时 显示 Dynamic Web Module 3.0 requires Java 1.6 or newer

eclipse 中 maven项目 改为dynamic Web Project 时 显示 Dynamic Web Module 3.0 requires Java 1.6 or newer我的环境:...

解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误

maven创建项目时出现解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误 解决方法 :build 中加入maven-compiler-p...

How to solve “Dynamic Web Module 3.1 requires Java 1.7 or newer” in Eclipse

Have you noticed above type of error in your Eclipse? When you’re creating a project with Dynamic ...

How to solve “Dynamic Web Module 3.1 requires Java 1.7 or newer” in Eclipse

Have you noticed above type of error in your Eclipse? When you’re creating a project with Dynamic W...
  • ye1992
  • ye1992
  • 2014-11-29 19:59
  • 24267
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)