• maven私服配置


    1、maven私服setting.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:
    epositories</localRepository>
       
      <pluginGroups></pluginGroups>
    
      <proxies></proxies>
    
      <servers>
        <server>
          <id>nexus-releases</id>
          <username>admin</username>
          <password>admin123</password>
        </server>
    
        <server>
          <id>nexus-snapshots</id>
          <username>admin</username>
          <password>admin123</password>
        </server>
      </servers>
    
      <mirrors></mirrors>
      
      <profiles>
        <profile>
           <id>center</id>
          <repositories>  
            <repository>  
                <id>nexus</id>
                <name>nexus</name>  
                <url>http://192.168.1.147:8081/nexus/content/groups/public/</url>  
                <releases>  
                    <enabled>true</enabled>  
                </releases>  
                <snapshots>  
                    <enabled>true</enabled>  
                </snapshots>  
            </repository>  
          </repositories> 
    
          <pluginRepositories>  
            <pluginRepository>  
                <id>nexus</id>  
                <name>nexus</name>  
                <url>http://192.168.1.147:8081/nexus/content/groups/public/</url>  
                <releases>  
                    <enabled>true</enabled>  
                </releases>  
                <snapshots>  
                    <enabled>true</enabled>  
                </snapshots>  
            </pluginRepository>  
        </pluginRepositories> 
        </profile>
    
      </profiles>
    
      <activeProfiles>
        <activeProfile>center</activeProfile>
      </activeProfiles>
    </settings>

     

    2、maven项目的pom.xml配置

        </dependencies>
    
        <distributionManagement>  
            <repository>  
                <id>nexus-releases</id>  
                <name>Nexus Release Repository</name>  
                <url>http://192.168.1.147:8081/nexus/content/repositories/releases/</url>  
            </repository>  
            <snapshotRepository>  
                <id>nexus-snapshots</id>  
                <name>Nexus Snapshot Repository</name>  
                <url>http://192.168.1.147:8081/nexus/content/repositories/snapshots/</url>  
            </snapshotRepository>  
        </distributionManagement> 
    
        <build>

     注意:id取值来自私服上repositories对应的name列

     注意:id取值来自私服上repositories对应的name列

     注意:id取值来自私服上repositories对应的name列

     

    打包发布到私服:deploy

     

     

  • 相关阅读:
    C#(99):Queue<T>队列与Stack<T>堆栈
    C#(99):字典Dictionary<Tkey.TValue>与SortedList
    C#(99):列表:List<T>与HashSet和只读集合
    C#(99):C#数组Array
    C#(99):枚举类型与位域枚举Enum
    C#(99):结构类型:Struct
    C#(99):定义类成员(属性、方法、索引、运算符、事件)、接口实现
    C#(99):定义类、System.Object对象、构造函数与析构函数、抽象类与静态类
    SuperSocket.ClientEngine介绍
    C#(99):五、并行编程
  • 原文地址:https://www.cnblogs.com/linjiqin/p/6742359.html
Copyright © 2020-2023  润新知