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

maven 项目出现JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer.错误

解决办法:

      这个是eclipse的bug,  可见这个链接:https://bugs.eclipse.org/bugs/show_bug.cgi?id=416704

即在pom下将1.7改为1.6  如下:

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

改过后可能出现问题: 

     

Project configuration is not up-to-date with pom.xml. Run Maven->Update Project or use Quick Fix

 

    这是因为pom被修改后,工程没有同步;可maven-update project进行同步

猜你喜欢

转载自blog.csdn.net/u014252478/article/details/81218465