简体   繁体   中英

artifactory local repo in maven project

I've setted artifactory in localhost (I'm trying on localhost before setting up my server), but when I use this repo in my maven project I can't retrieve my libs. Any suggestions?

Artifactory provides you with a small utility that generates a Maven settings file based on the repositories configured in Artifactory and your selections; assuming your repositories are properly configured, this utility normally does a good job.

Try (change id ClaudioStas to central):

<repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://localhost:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://localhost:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
          <url>http://localhost:8081/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>plugins-snapshot</name>
          <url>http://localhost:8081/artifactory/plugins-snapshot</url>
        </pluginRepository>
      </pluginRepositories>

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