zoukankan      html  css  js  c++  java
  • 在linux系统下建立artifactory管理maven库

    领导让建议一个maven私服来管理maven的jar包,于是上网搜索找到了artifactory,还不错,特把如何在linux部署artifactory记录下来。

    一、从http://www.jfrog.org/download.php上下载最新版

         我在这里下载到的是artifactory-2.1.2.zip,

        将artifactory-2.1.2.zip解压到/usr/local/artifactory-2.1.2

    二、安装

         1、进入artifactory-2.1.2 目录

          cd /usr/local/artifactory-2.1.2/bin

        2、./install.sh    即可完成Articfactory安装,简单吧。默认安装是采用jetty。

    三、配置

        1、编辑/usr/local/artifactory-2.1.2/etc/default文件

         gedit /usr/local/artifactory-2.1.2/etc/default

        2、增加JAVA_HOME环境变量 下面第四行.如果正确就不用改。

          #Default values

          #export ARTIFACTORY_HOME=/opt/artifactory/current

          #export ARTIFACTORY_USER=artifactory

          #export JAVA_HOME=/opt/java/1.6.0

          #export ARTIFACTORY_CONSOLE=${ARTIFACTORY_HOME}/logs/consoleout.log

    四、启动与关闭

            service artifactory start  service artifactory stop

    五、然后在浏览器中输入http://127.0.0.1:8081/articfactory,默认用户名和密码为admin、password,登录后。

    六、修改本地maven配置文件

    1、本地仓库:

    <localRepository>D:\apache-maven-2.2.0\repository</localRepository>

    2、artifactory库

    <profiles>

          <profile>

                <repositories>

                      <repository>

                            <id>central</id>

                            <url>http://10.10.71.24:8081/artifactory/ufidahealth-rhip-local</url>

                            <snapshots>

                                  <enabled>true</enabled>

                            </snapshots>

                      </repository>

                      <repository>

                            <id>snapshots</id>

                            <url>http://10.10.71.24:8081/artifactory/ufidahealth-rhip-local</url>

                            <releases>

                                  <enabled>true</enabled>

                            </releases>

                      </repository>

                </repositories>

                <pluginRepositories>

                      <pluginRepository>

                            <id>central</id>

                            <url>http://10.10.71.24:8081/artifactory/ufidahealth-rhip-local</url>

                            <snapshots>

                                  <enabled>true</enabled>

                            </snapshots>

                      </pluginRepository>

                      <pluginRepository>

                            <id>snapshots</id>

                            <url>http://10.10.71.24:8081/artifactory/ufidahealth-rhip-local</url>

                            <releases>

                                  <enabled>true</enabled>

                            </releases>

                      </pluginRepository>

                </pluginRepositories>

          </profile>

    </profiles>

    七、解决上传jar带时间戳的问题:

    登陆后点击Admin------Repositories---------上传jar的repo----------点击编辑-----------Maven Snapshot Version Behavior 选择不唯一即可,这个问题困扰很久。

  • 相关阅读:
    codeforces 616B Dinner with Emma
    codeforces 616A Comparing Two Long Integers
    codeforces 615C Running Track
    codeforces 612C Replace To Make Regular Bracket Sequence
    codeforces 612B HDD is Outdated Technology
    重写父类中的成员属性
    子类继承父类
    访问修饰符
    方法的参数
    实例化类
  • 原文地址:https://www.cnblogs.com/wangchy0927/p/2491801.html
Copyright © 2011-2022 走看看