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>
  • 相关阅读:
    Django_rest_framework
    Django之FBV / CBV和中间件
    数据库之MySQL补充
    数据库之Python操作MySQL
    数据库之MySQL进阶
    数据库之初识MySQL
    2-3、配置Filebeat
    2-2、安装Filebeat
    2-1、FileBeat入门
    5、Filebeat工作原理
  • 原文地址:https://www.cnblogs.com/river2005/p/7632008.html
Copyright © 2011-2022 走看看