在. 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 } } }