惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
U
Unit 42
T
Tailwind CSS Blog
罗磊的独立博客
WordPress大学
WordPress大学
小众软件
小众软件
Recent Announcements
Recent Announcements
博客园 - 聂微东
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
爱范儿
爱范儿
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
V
V2EX
博客园 - 三生石上(FineUI控件)
I
InfoQ
雷峰网
雷峰网
G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
B
Blog
腾讯CDC
A
About on SuperTechFans
博客园 - 叶小钗

博客园 - 快乐就好

vs code使用 mvn install 使用winsw部署spring boot项目 springboot jrebel热部署 springboot devtools热启动 浅谈单元测试 IntelliJ IDEA live template 方法配置 使用MHA实现MySQL主从复制高可用 Linux 常用命令介绍 开源堡垒机 dubbo循序渐进 - Jenkins自动化部署 maven教程 Git命令速查表 Maven中 jar包冲突原理与解决办法 延迟调度总结 使用Nexus3搭建Maven私服+上传第三方jar包到本地maven仓库 dubbo循序渐进 - 使用Docker安装Nexus dubbo循序渐进 - nacos安装 dubbo循序渐进 - 什么是RPC
maven下载,上传设置
快乐就好 · 2019-10-23 · via 博客园 - 快乐就好
<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:\Users\abc\.m2\repository_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>

posted @ 2019-10-23 15:38  快乐就好  阅读(414)  评论()    收藏  举报