maven的一些配置

. 设置本地仓库
1.1 示例语法

<localRepository>D:/maven/r2/myrepository</localRepository>

2. 修改 JDK 版本
2.1 JDK1.7

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


3. 修改镜像地址(不使用 nexus 时配置)
3.1 阿里云镜像

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

猜你喜欢

转载自www.cnblogs.com/loveBetty/p/10488655.html