maven 安装和配置



一、maven安装

       

  1. 下载maven安装包,官网http://maven.apache.org/download.cgi(比较慢),从其他地方下载的apache-maven-3.1.0版本
  2. 解压到路径D:\d
  3. 增加系统变量
  4. 系统变量的path中增加然后确定,确定,确定
  5. win+r   输入cmd打开命令行,mvn -version 看是否成功
二、maven  配置

0、配置文件的存放路径D:\study\apache-maven-3.3.3\conf,打开settings.xml里面有全的被注释了的配置,可以参照修改

1、加本地包的存放路径,

<localRepository>d:/d/mvn_repository_private</localRepository>

2.  在<profiles></profiles>里加<profile>
    <id>dev</id>
          <repositories>
             <repository>
                 <id>nexus</id>
                 <!--<url>http://maven.dds.com/nexus/content/groups/public/</url>-->
                 <url>http://maven.oschina.net/content/groups/public/</url>
                 <releases>
                    <enabled>true</enabled>
                 </releases>
                 <snapshots>
                    <enabled>true</enabled>
                 </snapshots>
              </repository>
            </repositories>           
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus</id>
                    <!--<url>http://maven.dds.com/nexus/content/groups/public</url>-->
                    <url>http://maven.oschina.net/content/groups/public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
 </profiles>

三、eclipse 中maven配置

   1、现在新下载的eclipse貌似自带maven插件,没有的可以去新下载一个

   2.



四、其他需要知道的

1、在记两个搜索jar包的maven依赖的常用地址:
http://search.maven.org/
http://mvnrepository.com/



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值