简体   繁体   English

Maven项目中的人工本地仓库

[英]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. 我已经在本地主机中设置了工件(我在设置服务器之前尝试在本地主机上),但是当我在Maven项目中使用此存储库时,无法获取我的库。 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; Artifactory为您提供了一个小型实用程序根据Artifactory中配置的存储库和您的选择来生成 Maven设置文件。 assuming your repositories are properly configured, this utility normally does a good job. 假设您的存储库已正确配置,则此实用程序通常会做得很好。

Try (change id ClaudioStas to central): 尝试(将ID ClaudioStas更改为中央):

<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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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