maven 项目管理软件
安装maven
----------------
下载文件:http://maven.apache.org/download.cgi
windows 下安装:
1.解压下载的maven压缩包即可
不要放中文或空格目录。
2.配置环境变量.
M2_HOME=c:\myprograme\apache-maven-3.3.9
PATH=...;%M2_HOME%\bin
3.验证是否安装成功
cmd>mvn -v
4.修改默认的仓库位置
[${maven_home}/conf/setttings.xml]
<settings ...>
...
<localRepository>e:/repo</localRepository>
...
</settings>
5.配置idea使用指定settings.xml文件.
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Tomcat7</id>
<username>tomcat</username>
<password>tomcat</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
Centos 下安装
1.tar开文件
/soft/apache-maven-3.3.9
/soft/maven --> maven-3.3.9
2.配置环境
[/etc/profile]
M2_HOME=/soft/maven
PATH=$PATH:$M2_HOME/bin
3.验证是否成功
$>mvn -v
4.配置文件修改同windows
maven 依赖查询地址: https://mvnrepository.com/