Eclipse4.5之后自带了Maven插件,不过一般不用,很多人喜欢自己配置,下面教大家怎么配置
1.下载配置m2e插件:
首先去官网下载 Maven:http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz
下载完毕之后将其解压,我将解压后的文件夹重命名成 maven,并将它放在 D:\Server 文件夹下,即 maven 终于的路径是:D:\Server\maven
2.配置Maven程序
3. 补充 关于修改seting.xml的操作(可以不修改)
3.设置下载镜像:阿里云 以及 JDK编译版本
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!--设置maven仓库存放路径-->
<localRepository>E:\WorkSpace\Maven</localRepository>
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers></servers>
<!--设置下载镜像:阿里云-->
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>
http://maven.aliyun.com/nexus/content/groups/public/
</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<!--设置JDK编译版本:1.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>
</profiles>
</settings>