导入Myeclipse导入maven项目报DescriptionResourcePathLocationType One or more constraints have not been s

来源:互联网 发布:java文件上传和下载 编辑:程序博客网 时间:2024/06/14 15:16

最近在学maven,一直都在idea上配置maven项目和编写,昨天想把maven项目导入myeclipse,一直报

One or more constraints have not been satisfied.

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

在网上找了很多方法,有的需要设置project fact,

有的需要在pox.xml文件添加

<configuration> 

<source>1.7(修改成自己JDK的版本)</source> 

<target>1.7(修改成自己JDK的版本)</target> 

</configuration>  

但都没用。最后在stackoverflow找到解决办法

需要在pom.xml文件中配置

<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>

这样问题就可以解决了。

注:这两者之间的差别可以参考http://blog.csdn.net/xyls12345/article/details/24990665



阅读全文
1 0