Maven

1.运行时环境

     电脑上已经安装jdk,且已经配置好JAVA_HOME环境变量

2.安装maven核心程序

     eg:  appache-maven-3.2.2

     2.1、配置maven环境变量:MAVEN_HOME或M2_HOME

                xxxx/xxxx/appache-maven-3.2.2

     2.2、path

               xxxx/xxxx/appache-maven-3.2.2/bin

    2.3、mvn -v验证

3.eclipse中配置maven路径

设置settings.xml路径:settings.xml可指定本地仓库位置等信息

4.idea中配置maven

file-->settings:

配置本地仓库和配置文件:

5、settings.xml配置

    5.1.阿里云镜像

      <mirrors>
         <mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>central</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
         </mirror>
     </mirrors>

    5.2.本地仓库

    <localRepository>D:\Respository</localRepository>

    5.3.jdk配置

<profiles>
    <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>

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值