Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

AI人工智能学习大礼包

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > Java基础相关 >

软件开发基于Nexus的Maven与Npm私有仓库搭建 PDF 下载


分享到:
时间:2025-09-14 11:05来源:http://www.java1234.com 作者:转载  侵权举报
软件开发基于Nexus的Maven与Npm私有仓库搭建
失效链接处理
软件开发基于Nexus的Maven与Npm私有仓库搭建 PDF 下载

 
 
相关截图:
 
主要内容:
 

3)配置repository 
有两种方式:
① 修改settings.xml文件,一劳永逸 
通过在全局的settings文件配置altSnapshotDeploymentRepository 和
altReleaseDeploymentRepository进行发布,只需配置一次,所有项目就都可以发布,无需在多个项目
pom指定

 

  <profiles>
     <profile> <!-- 公司maven私服配置 -->
        <id>company</id> 
    <properties> <!-- 用于配置发布的仓库 -->
            <altReleaseDeploymentRepository>
               companyreleases::default::http://localhost:18081/repository/maven-releases/

           </altReleaseDeploymentRepository>
            <altSnapshotDeploymentRepository>
               companysnapshots::default::http://localhost:18081/repository/maven-snapshots/

           </altSnapshotDeploymentRepository>
        </properties> 
        <repositories> <!-- 用于配置拉取依赖的仓库 -->
            <repository>
                <id>company-nexus</id> <!-- repository id要和server id一致才能正确传
递账号密码 -->
                <url>http://localhost:18081/repository/maven-public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories> 
 </profile>     
<!-- 个人maven私服配置
      <profile>
        <id>person</id>
        ...
      </profile>
      -->    
  </profiles>
  <activeProfiles>
    <activeProfile>company</activeProfile> <!-- 填写要激活得profile id -->
    <!--activeProfile>person</activeProfile--> <!-- 支持激活多个profile -->
  </activeProfiles>

 



 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐