zoukankan      html  css  js  c++  java
  • 如何把jar包发布到maven私服

    1.格式

     mvn deploy:deploy-file -DgroupId=com.qiyi -DartifactId=sphinx -Dversion=1.0 -Dpackaging=jar -Dfile=D:sphinxapi.jar -Durl=[url] -DrepositoryId=[id

    2.实例

    D:developapache-maven-3.0.4in>mvn deploy:deploy-file -DgroupId=org.sphx -DartifactId=sphinxapi -Dversion=1.0 -Dpackaging=jar -Dfile=D:sphinxapi.jar

    -Durl=http://10.10.10.10:8800/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

    DgroupId和DartifactId构成了该jar包在pom.xml的坐标,项目就是依靠这两个属性定位。自己起名字也行。

    Dfile表示需要上传的jar包的绝对路径。

    Durl私服上仓库的位置,打开nexus——>repositories菜单,可以看到该路径。

    DrepositoryId服务器的表示id,在nexus的configuration可以看到。

    上传成功后,在nexus界面点击3rd party仓库可以看到这包。

    3.配置权限

    $MAVEN/conf/settings.xml

    <server>
        <id>repositoryId</id>
        <username>admin</username>
        <password>111111</password>
    </server>
  • 相关阅读:
    Linux makefile教程之概述一[转]
    Valid Parentheses
    Letter Combinations of a Phone Number
    机器学习经典分类算法 —— C4.5算法(附python实现代码)
    3Sum Closest
    3Sum
    Integer to Roman
    寒假文献阅读(四)
    Longest Common Prefix
    Roman to Integer
  • 原文地址:https://www.cnblogs.com/river2005/p/7632008.html
Copyright © 2011-2022 走看看