zoukankan      html  css  js  c++  java
  • maven的安装,maven库配置和Eclipse插件的安装

    maven的安装,maven库配置和Eclipse插件的安装

    1.下载并解压maven

    2.配置环境变量

    3.配置maven配置文件

    1.下载链接

    Downloading Apache Maven

    2.配置环境变量

      MAVEN_HOME:E:apache-maven-3.3.3  (maven解压得后所在的路径)

      Path:添加   %MAVEN_HOME%in;

      测试  cmd中 输入  mvn -version   显示版本信息   则安装成功

    3.配置maven配置文件

      conf/setting.xml

      添加

      //本地仓库

       <localRepository>F:MavenRepo</localRepository>

      //添加阿里云镜像地址

      

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

      //设置oschina仓库地址(现在不稳定,似乎关了)

    <profiles>
            <profile>
                <id>jdk-1.8</id>
    
                <activation>
                    <jdk>1.8</jdk>
                </activation>
    
                <repositories>
                    <repository>
                        <id>nexus</id>
                        <name>local private nexus</name>
                        <url>http://maven.oschina.net/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>nexus</id>
                        <name>local private nexus</name>
                        <url>http://maven.oschina.net/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
        </profiles>
    

    Eclipse插件

      Eclipse中 windows->perference->maven->installation

      点击Add 将maven的目录添加进去并选中

      

      在UserSetting 中

      在usersetting那一栏中 选取  刚才修改的setting.xml 文件

  • 相关阅读:
    eclipse常用的快捷键
    如何保留小数点后N位?
    EditText设置/隐藏光标位置、选中文本和获取/清除焦点(转)
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常(转)
    STL优先队列 hdu1896
    工作排序问题 poj2376
    STL存储邻接表
    二叉树的遍历
    快速排序
    并查集 并查集来判断是否存在环路
  • 原文地址:https://www.cnblogs.com/dawnheaven/p/4760038.html
Copyright © 2011-2022 走看看