eclipse怎么用maven

配置Maven

首先保证Java环境是有的(Maven 3.1以上 要求 JDK 1.6 或以上版本, 而 Maven 3.0/3.1 需要 JDK 1.5 或以上)

eclipse怎么用maven

准备安装包

eclipse怎么用maven

放到安装目录,直接解压,解压后目录

eclipse怎么用maven

配置环境变量

MAVEN_HOME=D:\Maven

Path=%MAVEN_HOME%\bin

eclipse怎么用maven

eclipse怎么用maven

DOS中查看我们的Maven已经配置完成

eclipse怎么用maven

个人喜欢修改仓库位置,进入到MaveUPxArfYgAmn/conf中,打开setting.xml

eclipse怎么用maven

找到LocalRepository的位置,修改配置

eclipse怎么用maven

因为中央仓库的地址,我们下载的时候回很慢,所以重新配置一个地址,我们使用阿里的镜像速度较快。

alimaven

aliUPxArfYgAmyun maven

http://maven.aliyun.com/nexus/content/groups/public/

central

eclipse怎么用maven

我们先执行mvn help:system,下载一些东西,可以查看D:\Repository中是不是多了文件。

eclipse怎么用maven

Eclipse配原由网置Maven

打开Eclips中Window->Preferences

eclipse怎么用maven

找到Maven菜单项,在右边的配置部分按照如图的方式配置

让全局和个人配置都一致,并且生UPxArfYgAm效。

我的Maven仓库在D:/Repository中,所以最下面的一栏是按照我本地的环境配置。

eclipse怎么用maven

打开Window中Show View->Other

eclipse怎么用maven

输入maven,打开Maven视图

eclipse怎么用maven

在Eclipse下方面板出现Maven Repository方便我们之后操作管理

eclipse怎么用maven

打开Global Repositories可以查看我们的镜像地址,我们使用的是阿里的镜像地址。原由网

http://maven.aliyun.com/nexus/content/groups/public/

eclipse怎么用maven

内容版权声明:除非注明原创否则皆为转载,再次转载请注明出处。

文章标题: eclipse怎么用maven

文章地址: www.58yuanyou.com/jiqiao/235325.html

相关推荐