artifactory local repo in maven project

点点圈 提交于 2019-12-12 03:55:35

问题


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?


回答1:


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.




回答2:


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>


来源:https://stackoverflow.com/questions/12990319/artifactory-local-repo-in-maven-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!