首页 > 编程知识 正文

maven配置远程仓库,将jar包安装到本地仓库

时间:2023-05-06 21:27:28 阅读:53929 作者:4673

在. gradle目录中,修改init.gradle文件并更改maven地址。

在. m2目录中,修改settings.xml文件并更改maven地址。

以下是init.gradle文件:

all项目{ repositories } def repository _ URL=

‘http://192.168.1.xx : xxxx/nexus/content/groups/public’all {

repo实例of (artifactrepositoryrepo-if )

mavenartifactrepository (def URL=repo.URL.tostring ) ) if

(URL.starts with (https://repo1. maven.org/maven2)||

URL.starts with (https://j center.bin tray.com/() ) ) ) ) ) ) )。

project.logger.life cycle“存储库”

repo.urlreplacedbyrepository _ URL .”remove repo } } maven local (

maven { url REPOSITORY_URL } } }

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。