简体   繁体   中英

Maven Nexus Repository

I have a private Nexus repository set up for Maven on one PC in my LAN. I want to connect to the same Nexus repository from another PC in my LAN. How can I accomplish this?

You have to make the changes in installed Maven/conf and setting.xml file and something like below which i did for Artifactory.

<pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>remote-repos</name>
          <url>http://localhost:8081/artifactory/remote-repos</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>remote-repos</name>
          <url>http://localhost:8081/artifactory/remote-repos</url>
        </pluginRepository>
      </pluginRepositories>

FYI please check https://support.sonatype.com/entries/20943003-Configure-Maven-to-Download-from-Nexus

You need to setup the settings file: http://books.sonatype.com/nexus-book/reference/config-maven.html#ex-maven-nexus-simple

Make sure to use the IP address/ name of the machine running Nexus instead of localhost.

AFAIK, this should work out-of-the-box: https://books.sonatype.com/nexus-book/reference/running.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM