1. 程式人生 > >eclipse修改maven預設JRE System Library

eclipse修改maven預設JRE System Library

在你的maven安裝目錄下,找到conf/settings.xml

在<profiles></profiles>標籤里加入如下,然後在eclipse->window->preferences->maven->user settings->user settings,找到剛剛的settings.xml,點選update settings,然後apply and close,右擊你的maven專案,maven->update project

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