Configure Eclipse to use maven to build the project The default JDK is 1.8

Add the following configuration in the profiles tab of maven's setting file to use jdk 1.8 by default when all future projects are built.

<profile>    
      <id>jdk-1.8</id>    
      <activation>    
             <activeByDefault>true</activeByDefault>    
             <jdk>1.8</jdk>    
      </activation>    
      <properties>    
            <maven.compiler.source>1.8</maven.compiler.source>    
            <maven.compiler.target>1.8</maven.compiler.target>    
            <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>    
      </properties>    
</profile>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324917567&siteId=291194637