maven中jre版本问题
2017-03-14 11:49
211 查看
开发过程中忽然报这样的错:
1、Dynamic Web Module 3.0 requires Java 1.6 or newer.
2、Java compiler level does not match the version of the installed Java project facet.
3、JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer.
4、One or more constraints have not been satisfied.
刚开始我是这样处理的:项目右键-->Properties-->Project Facets 中java 版本改为1.8,然后java build path中修改jre版本,但是当再次选择 maven -> Update Project 更新的时候,jre又回到了原来的版本。
试了两次后,我发现还是这样。
然后在pom.xml中加入
<build>
<defaultGoal>compile</defaultGoal>
<!-- 设置项目中jar版本为1.8 Start -->
<finalName>ADS-B</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<!-- 设置项目中jar版本为1.8 End -->
</build>问题解决~
1、Dynamic Web Module 3.0 requires Java 1.6 or newer.
2、Java compiler level does not match the version of the installed Java project facet.
3、JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer.
4、One or more constraints have not been satisfied.
刚开始我是这样处理的:项目右键-->Properties-->Project Facets 中java 版本改为1.8,然后java build path中修改jre版本,但是当再次选择 maven -> Update Project 更新的时候,jre又回到了原来的版本。
试了两次后,我发现还是这样。
然后在pom.xml中加入
<build>
<defaultGoal>compile</defaultGoal>
<!-- 设置项目中jar版本为1.8 Start -->
<finalName>ADS-B</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<!-- 设置项目中jar版本为1.8 End -->
</build>问题解决~
相关文章推荐
- Eclipse创建Maven-Web项目及解决 jre版本和web.xml版本问题
- eclipse创建maven项目时,jre版本和web.xml版本问题
- Eclipse创建Maven-Web项目及解决 jre版本和web.xml版本问题
- Eclipse创建Maven-Web项目及解决 jre版本和web.xml版本问题
- Maven无法下载mybatis-spring_1.2.2版本的问题
- 解决IntelliJ IDEA 13更新FindBugs 0.9.993时JRE版本过低导致启动失败问题
- maven出现(请使用-source 5 或者更高版本以启用XX)问题解决
- maven出现(请使用-source 5 或者更高版本以启用XX)问题解决
- Browser JRE安全证书版本 Bad Version 问题解决
- 解决maven项目将model version改成3.0版本问题
- 关于 maven 私服删除版本恢复的问题
- myeclipse中设置jre版本的问题
- 为什么使用MAVEN 3.2.1会有版本问题?
- Maven项目中修改jre版本
- 软件安装——JRE多版本问题
- mac os下用maven做版本发布的svn权限问题
- maven出现(请使用-source 5 或者更高版本以启用XX)问题解决
- JDK和JRE不同版本切换的问题
- Eclipse安装Maven插件后提示JRE问题
- Maven新建项目的JDK版本类型问题