在网上下载的开源工程,用maven构建的时候报错:

Dynamic Web Module 3.0 requires Java 1.6 or newer.

JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer.

即使你把properties->Java Compiler->Complier compliance level设置为1.7或1.8也不管用。

解决方法:

第一步,在pom.xml中定义jdk的版本,如下

     <build>
<finalName>Example</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-complier-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
   </build>

以及

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<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>

  

第二步,修改.settings文件夹里的org.eclipse.jdt.core.prefs文件,把其中的版本均改为1.7

org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.source=1.7

第三步,修改.settings文件夹里的org.eclipse.wst.common.project.facet.core.xml,把其中java的版本改为1.7

<installed facet="java" version="1.7"/>

完成之后,再通过maven的update project操作,刷新整个工程。

[maven] "Dynamic Web Module 3.0 requires Java 1.6 or newer." OR "JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer."的更多相关文章

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

    不一定是在Maven Projects里才有这种情况,但解决方法是一样的. 转自:http://qussay.com/2013/09/13/solving-dynamic-web-module-3-0 ...

  2. MAVEN ERROR : Dynamic Web Module 3.0 requires Java 1.6 or newer

    问题: 在eclipse中,通过Maven->Update Project更新项目后,出现Dynamic Web Module 3.0 requires Java 1.6 or newer错误提 ...

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

  4. maven项目中的报错问题——Dynamic Web Module 3.0 requires Java 1.6 or newer.

    转自:http://www.cnblogs.com/beppezhang/p/5919221.html maven项目中的报错问题——Dynamic Web Module 3.0 requires J ...

  5. maven Dynamic Web Module 3.0 requires Java 1.6 or newer

      maven Dynamic Web Module 3.0 requires Java 1.6 or newer CreateTime--2018年4月19日16:56:42 Author:Mary ...

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

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

  8. Cannot change version of project facet Dynamic Web Module to 3.0 requires Java 1.6 or newer 解决方案

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

  9. (转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案

    场景:在导入Maven项目时候遇到如下错误. 1 问题描述及解决 Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Loca ...

随机推荐

  1. iOS - is missing from working copy

    解决方案:1.打开终端2.cd 到警告所提示的文件夹下3.执行命令svn rm --force 丢失文件的名称 丢失的文件太多批量处理:1.打开终端2.sudo find /Users/mac/Des ...

  2. ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together

    群里有位兄弟,测试系统修改sga_lock=true参数后,重启库报错 ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot b ...

  3. Visual Studio AI环境记录(Windows10)

    一.环境 Windows [版本 10.0.15063]64位 Git-2.14.1 64位[官网下载] TortoiseGit-2.5.0.0 64位[官网下载],这是一个Git 客户端,外号&qu ...

  4. linux 保留文件 其余删除

    set选项与shopt选项是两组不同的内容,用set -o和shopt -p可以分别查看两个组所有的打开和关闭的条目, 在默认状态下,有些是打开的,有些是关闭的,shopt各选项随着bash版本的更新 ...

  5. 2.4 Visio2007显示动态对齐网格

  6. Linux whereis命令详解

    Linux whereis命令 Linux whereis命令用于查找文件. 该指令会在特定目录中查找符合条件的文件.这些文件应属于原始代码.二进制文件,或是帮助文件. 该指令只能用于查找二进制文件. ...

  7. [zz]蟑螂蚂蚁蚊子已不住在我家了!这个方法100%见效…

    http://mt.sohu.com/20150324/n410238511.shtml 蚂蚁怕酸,蚊子怕辣,蟑螂怕香.在下给各位提供一个不杀生又能驱赶蚂蚁.蚊子.蟑螂的妙法. 一.蚂蚁怕酸味 家里的 ...

  8. delphi 下载

    最新(更多)内容,请到  http://www.cnblogs.com/key-ok/p/3465486.html  Borland Pascal v7.1 (13.89 Mb)  Delphi 1 ...

  9. SpringSecurity-FilterSecurityInterceptor的作用

    FilterSecurityInterceptor也是很重要的一个interceptor,它的作用是对request进行权限判断,允许访问或者抛出accessDenied异常. 这个类继承Abstra ...

  10. server2012 多用户远程桌面

    这个服务器是客户提供的,阿里云平台的服务器.版本是windows-server2012,拿过来的时候,只有一个windows系统,啥都没有. 我们公司的数据库开发设计人员,B/S开发人员,APK开发人 ...