profiles标签里面增加如下
<profiles>
<profile>
<id>jdk8</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>
<profile>
<id>custom-compiler</id>
<properties>
<JAVA8_HOME>C:\Program Files\Java\jdk1.8.0_65\bin</JAVA8_HOME>
</properties>
</profile>
</profiles>
activeProfiles标签增加如下
<activeProfiles>
<activeProfile>custom-compiler</activeProfile>
<!-- <activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>-->
</activeProfiles>
=====================================
下面是常见配置
镜像
<mirror>
<id>central-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>aliyun-mirror</name>
<!--< <url>http://192.168.1.146:8081/nexus/content/groups/public/</url>-->
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
然后修改本地仓库即可localRepository标签