无法下载maven私库中项目的问题

最近着手将项目拆分为了多个子项目,首先建立了一个父项目用于管理所有maven依赖包,接着做了两个工具jar,再就是几个业务项目。父项目和工具jar都上传到了公司私库,后来其他同事反应无法下载。通过调试发现,需要在业务项目中配置私库才能下载。

父项目中配置私库

 <distributionManagement>
        <repository>
            <id>g7-release</id>
            <url>http://xx.com/artifactory/libs-release-local</url>
        </repository>
        <snapshotRepository>
            <id>g7-snapshots</id>
            <url>http://xx.com/artifactory/libs-snapshot-local</url>
        </snapshotRepository>
    </distributionManagement>

工具jar和业务项目配置私库

<repositories>
        <repository>
            <id>g7-central</id>
            <url>http://xx.com/artifactory/libs-release</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

如果要执行deploy,需要在setting.xml中配置你的私库账号

<server>
		<id>g7-release</id>
		<username>liufangwei</username>
		<password>xx</password>
	  </server>
	  <server>
		<id>g7-snapshots</id>
		<username>liufangwei</username>
		<password>xx</password>
	  </server>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值