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

Author: Seaside stare      Source: CSDN
Original: https: //blog.csdn.net/xingyuexi87/article/details/76928110 

===========================================================================

maven project appears JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer. Error

Solution:

      This is the eclipse of the bug, found this link: https: //bugs.eclipse.org/bugs/show_bug.cgi id = 416704?

I.e., in the 1.6 to 1.8 pom follows:

<!--在pom文件 <build>里面 -->
<plugins>
    <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
             <source>1.8</source>
             <target>1.8</target>
        </configuration>
    </plugin>
</plugins>   

Problems may arise after the turn: 

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

Right-click the error, choose Quick Fix.

the reason:

This is because the pom been modified, the project is not synchronized; maven-update project can be synchronized

 

Guess you like

Origin www.cnblogs.com/ic710/p/11074767.html