Maven local configuration obtains dependencies of nexus private server

Scenes

Nexus-use the Maven private server in the project, deploy to the private server, upload the third-party jar package, and use the private server jar package in the project:

Nexus-Use Maven private server in the project, deploy to the private server, upload third-party jar package, use private server jar package in the project_nexus maven-releases allow deployment-CSDN blog

What we talked about above is how to configure the repository in the pom of the project that needs to pull the private server dependencies to obtain the dependencies.

If you need to make global configuration in local maven, you can do it by adding a mirror.

Note:

Blog:
Domineering hooligan temperament_C#, architecture road, SpringBoot-CSDN blog

accomplish

1. Find the Maven configuration place in IDEA and determine the location of the maven configuration file settings.xml.

2. If Nexus requires authentication, first configure the username and password under servers

<!-- 配置本地仓库访问私服的权限  nexus的 登录用户名密码 -->
    <server>
        <id>maven-snapshots</id>
        <username>iuni</username>
        <password>Mima!@2202</password>
    </server>

Add location

3. Then add the mirror under mirrors

    <mirror>
       <id>maven-snapshots</id>
       <mirrorOf>central</mirrorOf>
       <name>Maven public</name>
       <url>http://ip:8180/repository/maven-snapshots/</url> 
    </mirror>

Add location

Then re-import the dependencies to pull the private server dependencies globally.

Guess you like

Origin blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/134142474