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

推荐订阅源

B
Blog RSS Feed
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
Y
Y Combinator Blog
Jina AI
Jina AI
G
Google Developers Blog
Last Week in AI
Last Week in AI
博客园 - 叶小钗
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
The GitHub Blog
The GitHub Blog
D
Docker
量子位
罗磊的独立博客
腾讯CDC

博客园 - 快乐就好

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)  评论()    收藏  举报