zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    位军营 20190919-4 测试,结对要求
    位军营 20190919-5 代码规范,结对要求
    国内源
    hexo安装-nodejs
    python调用chrome打开指定网址
    生成证书,用于签名Android应用
    cygwin64-安装包管理工具
    Android-删除指定包名的App
    pyqt5加载网页的简单使用
    打包python到exe
  • 原文地址:https://www.cnblogs.com/happyday56/p/11726607.html
Copyright © 2011-2022 走看看