Markers处提示以下两个错误:
JAX-RS(REST Web Services)2.0 can not be installed: One or more constraints have not been satisfied
JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer.
错误缘由:项目使用的JRE是 JavaSE1.5,直接该处右键properties更改后,maven update项目又会回到原来的1.5版本
解决办法:
在pom.xml中添加插件,如下:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>