STS报告的错误abotut动态Web模块版本 [英] Error abotut dynamic web module version reported by STS

查看:183
本文介绍了STS报告的错误abotut动态Web模块版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Spring 3.0.6和Maven 3.0.3在STS 2.9.2中创建了一个Web项目。我创建了一些没有错误的页面和代码。
我在项目的pom.xml中将Spring库版本从3.0.6升级到3.1.2,现在我收到以下错误消息:

I've created a web project in STS 2.9.2 using Spring 3.0.6 and Maven 3.0.3. I've created some pages and code with no errors. I've upgraded Spring libraries version from 3.0.6 to 3.1.2 in project's pom.xml and now I get following error message:


动态Web模块3.0需要Java 1.6或更高版本。

Dynamic Web Module 3.0 requires Java 1.6 or newer.

项目面中的动态Web模块版本和Java编译器版本已设置分别为2.5和1.6。同时将我的项目的JRE系统库设置为1.6。

Dynamic web module version and Java compiler version in project's faces are set to 2.5 and 1.6 respectively. Also set JRE system library for my project to 1.6.

我试图删除Maven性质然后再次添加它并且JRE系统库自动设置为JSE 1.5(但我没有安装Java 1.5)。我手动将JRE系统库更改为1.6(以修复有关JRE系统库版本的STS投诉)但是关于动态Web模块的错误仍然存​​在。

I've tried to remove Maven nature and then add it again and JRE system library is set to JSE 1.5 automatically (but I have no Java 1.5 installed). I change JRE system library to 1.6 manually (to fix STS complaint about the JRE system library version) but error about dynamic web module remains.

我已经google了一个修复程序但我什么都没发现。

I've googled for a fix but I've found nothing.

我该如何解决这个错误?

How can I solve that error?

推荐答案

首先检查您的项目是否已配置为使用Java 1.7。
右键单击项目> Properties> Java Compiler并将Compiler compliance level设置为1.7。

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.

接下来从左侧菜单中选择Project Facets> Java并将其版本设置为1.7
如果您没有找到1.7作为之前首选项中的下拉选项之一,那么您必须先将其添加到eclipse中。
导航到eclipse Preferences> Java> Installed JREs,单击Add,找到已安装的Java路径。

Next from the menu on the left select Project Facets > Java and set its version to 1.7 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.

打开项目的pom.xml并添加此插件标签

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

<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>

最后,右键单击您的项目> Maven>更新项目......

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

资料来源: http://qussay.com/2013/09/13/solving-dynamic-web-module-3-0-requires-java-1-6-or-newer-in- maven-projects /

这篇关于STS报告的错误abotut动态Web模块版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆