zoukankan      html  css  js  c++  java
  • 上传jar包至maven私服

    1.maven环境变量配置(新建系统变量,编辑Path)

    2.修改maven的setting文件

    2.1 私服的用户配置

    2.2 私服镜像配置

    2.3 (我也不知道是啥)

     1 <profile>
     2 <id>nexus</id>
     3 <repositories>
     4 <repository>
     5 <id>central</id>
     6 <url>http://central</url>
     7 <releases>
     8 <enabled>true</enabled>
     9 </releases>
    10 <snapshots>
    11 <enabled>true</enabled>
    12 </snapshots>
    13 </repository>
    14 </repositories>
    15 
    16 <pluginRepositories>
    17 <pluginRepository>
    18 <id>central</id>
    19 <url>http://central</url>
    20 <releases>
    21 <enabled>true</enabled>
    22 </releases>
    23 <snapshots>
    24 <enabled>true</enabled>
    25 </snapshots>
    26 </pluginRepository>
    27 </pluginRepositories>
    28 </profile>
    29 </profiles>
    30 
    31 <activeProfiles>
    32 <activeProfile>nexus</activeProfile>
    33 </activeProfiles>
    View Code

    3.在cmd中执行命令:

    mvn deploy:deploy-file -Dfile=D:/springboot/db2jcc.jar -DgroupId=com.db2jcc -DartifactId=db2jcc -Dversion=11 -Dpackaging=jar -DrepositoryId=nexus -Durl=http://10.2.177.4:8081/nexus/repository/maven-releases

    -Dfile:jar包在本地的路径

    -DgroupId:对应于pom文件中的groupId

    -DartifactId:对应于pom文件中的artifactId

    -Dversion:对应于pom文件中的version

    -Durl:私服的maven仓库

  • 相关阅读:
    雅虎35条优化黄金守则
    安装入门
    NPOI 2.0 Excel读取显示
    STL算法
    MVVM框架avalon在兼容旧式IE
    Asp.Net MVC3.0网站统计登录认证的在线人数
    Windows Server 服务器安全配置
    SignalR的服务器广播
    angularjs + seajs构建Web Form3
    MVC应用程序显示上传的图片
  • 原文地址:https://www.cnblogs.com/ZnCl/p/7233589.html
Copyright © 2011-2022 走看看