- 本地仓库: 默认在
C:\Users\用户名\.m2\repository
, 修改settings.xml
<localRepository>D:\repository</localRepository>
- 中央仓库:
http://repo1.maven.org/maven2/
在国外, 下载速度非常慢, 修改settings.xml
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
- 修改默认项目的jdk版本,创建的maven项目都会默认选择JDK1.8
<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>