• maven包上传私服


    我们使用的版本是 nexus respository manager 3.17.0-01 ,下面是基于此版本的一套使用手册

    • 下载并导入maven配置 settings.xml ;
    <?xml version="1.0" encoding="UTF-8"?>
    
    
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
    
    <localRepository>D:workproject
    epository</localRepository>
    
      <pluginGroups></pluginGroups>
    
      <proxies></proxies>
    
    <mirrors>
        <!-- 阿里云仓库-->
        <mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
        </mirror>
         
        <!-- 中央仓库1-->
        <mirror>
            <id>repo1</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo1.maven.org/maven2/</url>
        </mirror>
        
        <!-- 中央仓库2-->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
         
        <mirror>
            <id>public</id>
            <mirrorOf>central</mirrorOf>
            <name>central repository</name>
            <url>http://仓库地址/repository/maven-public/</url>
        </mirror>
    </mirrors>
    
    <profiles>
        <profile>
            <id>nexusProfile</id>
            <repositories>
                <repository>
                    <id>nexus</id>
                    <name>nexus</name>
                    <url>http://仓库地址/repository/maven-central/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    
    <activeProfiles>
        <activeProfile>nexusProfile</activeProfile>
    </activeProfiles>
    
      <servers>
        <server>
    		<id>releases</id>
    		<username>仓库用户名</username>
    		<password>仓库密码</password>
    	</server>
    	<server>
    		<id>snapshots</id>
    		<username>仓库用户名</username>
    		<password>仓库密码</password>
    	</server>
      </servers>
    	
    </settings>
    

      

    • 配置本地项目pom.xml,加入配置
    <distributionManagement>
        <repository>
            <id>releases</id>
            <name>User Project RELEASES</name>
            <url>http://10.109.20.137:8091/repository/maven-releases/</url>
        </repository>
     
        <snapshotRepository>
            <id>snapshots</id>
            <name>User Project SNAPSHOTS</name>
            <url>http://10.109.20.137:8091/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    • 如何上传jar包到私服仓库

    选择需要上传的项目右键-->Run As-->Run Configurations-->Maven Buid-->右键 new -->选择 base directory-->配置 Goals 输入 deploy -e

  • 相关阅读:
    php 时间段查询排序分组
    php 导出word
    关于UVM driver的幕后
    三次握手的必要性
    如何卸载360天擎之火绒与天擎相爱相杀
    【虚拟机】VirtualBox设置共享文件夹
    【数据结构与算法】打开转盘锁:使用图的广度优先遍历实现
    【Python】PDF文档导出指定章节为TXT
    【数据结构与算法】不同路径 III:使用哈密尔顿路径算法实现
    【Java】可比较泛型建数组传递报强转类型错误解决方案
  • 原文地址:https://www.cnblogs.com/yun965861480/p/7365263.html
Copyright © 2020-2023  润新知