随着信息的发展越来越多的人开始学习编程了 在java开发中必不可少的项目管理插件 Maven 就油然而生了
Maven 下载地址:http://maven.apache.org/download.cgi
1.将Maven解压 2.配置环境变量 右键点击我的电脑---->属性---->环境变量---->系统变量找到Path 在里面添加maven的安装路径 3.测试Maven是否安装成功 打开cmd黑窗口 输入mvn -v,出现如下图的信息 就是环境配置成功了
找到mirrors节点 在里面添加 如下
<mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> <!-- 中央仓库1 --> <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo1.maven.org/maven2/</url> </mirror> <!-- 中央仓库2 --> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> </mirrors> **最后更改jdk版本,在setting.xml文件中找到profile节点(添加如下代码,jdk版本要和自己使用的版本一致)** <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> </profiles>1.Windows---->Preference----->Maven 这里找到自己maven的路径,点击完成 找到User Settings 如图