• maven下载,上传设置


    <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">
        
       <!--就是配置maven本地仓库的地址为自定义的地址-->
        <localRepository>C:Usersabc.m2
    epository_demo</localRepository>
        <!--nexus服务器-->
         <servers>
              <server>
                <id>releases</id>
                    <username>admin</username>
                    <password>admin123</password>
              </server>
              <server>
                <id>snapshots</id>
                <username>admin</username>
                    <password>admin123</password>
              </server>
              <server>
                <id>public</id>
                <username>admin</username>
                    <password>admin123</password>
              </server>
          </servers>
    
        <mirrors>
            <mirror>
                <id>public</id>
                <mirrorOf>central</mirrorOf>
                <name>public central</name>
                <url>http://localhost:8081/repository/my_group/</url>
            </mirror>
        </mirrors>
        
        <profiles>
            <profile>
                <id>default</id>
        <repositories>
                    <repository>
                        <id>releases</id>
                        <url>http://localhost:8081/repository/my_hosted_release/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>    
                    <repository>
                        <id>snapshots</id>
                        <url>http://localhost:8081/repository/my_hosted_snapshots/</url>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                            <updatePolicy>always</updatePolicy>
                        </snapshots>
                    </repository>            
                </repositories>
                <!--从远处仓库下载 public 包含了可以不用配置-->
                 <pluginRepositories>
                    <pluginRepository>
                        <id>releases</id>
                        <url>http://localhost:8081/repository/my_hosted_release/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>snapshots</id>
                        <url>http://localhost:8081/repository/my_hosted_snapshots/</url>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
        </profiles>
        <activeProfiles>
            <activeProfile>default</activeProfile>
        </activeProfiles>
        
    </settings>

     上传到私有库配置

     <!--上传到私有库-->
        <distributionManagement>
            <repository>
                <id>releases</id>
                <name>internal releases</name>
                <url>http://localhost:8081/repository/my_hosted_release/</url>
            </repository>
            <snapshotRepository>
                <id>snapshots</id>
                <name>internal snapshot</name>
                <url>http://localhost:8081/repository/my_hosted_snapshots/</url>
            </snapshotRepository>
        </distributionManagement>
  • 相关阅读:
    测试一个纸杯需要考虑什么?
    第三十三天-rsync高级同步工具深度实战
    运维人员必须熟悉的运维工具汇总
    Mysql 高负载排查思路
    查看mysql主从配置的状态及修正 slave不启动问题
    第三十二天-rsync高级同步工具基础
    第三十一天-两个例题
    linux mail 命令参数
    第三十天-ssh key企业批量分发自动化管理案例
    第二十九天-ssh服务重要知识深入浅出讲解
  • 原文地址:https://www.cnblogs.com/happyday56/p/11726607.html
Copyright © 2020-2023  润新知