maven网址:maven下载
下载之后解压(解压目录如下):
Bin:maven运行的命令
Boot和lib:依赖java的jar架包
Conf:maven一些配置文件
配置maven:在conf下的Setting.xml里配置
1、配置本地仓库
D://maven_lib
2、配置国内阿里云仓库
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
3、配置全局JDK版本
<profiles>
<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>
</profiles>
最后使用配置好的maven【这里使用eclipse演示】