修改maven的默認jdk版本


重點推薦方法 :

在maven的安裝目錄找到settings.xml文件,在里面添加如下代碼:

<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>

添加完后,在對eclipse進行設置。window->preferences->maven->user settings,user settings那里選擇maven安裝目錄下的settings.xml文件。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM