【问题标题】:artifactory local repo in maven projectMaven项目中的人工本地回购
【发布时间】:2012-10-11 00:23:55
【问题描述】:

我已经在 localhost 中设置了工件(我在设置服务器之前尝试使用 localhost),但是当我在我的 maven 项目中使用这个 repo 时,我无法检索我的库。有什么建议吗?

【问题讨论】:

  • 错误信息?你的 pom 看起来怎么样?你是如何建立 Artifactory 的?我应该怎么猜?
  • Artifactory 安装在 8081 端口,我收不到任何错误信息...<repository> <id>ClaudioStas</id> <name>ClaudioStas-releases</name> <url>http://localhost:8081/artifactory/stas</url> </repository>

标签: maven artifactory


【解决方案1】:

Artifactory 为您提供small utility,它会根据 Artifactory 中配置的存储库和您的选择生成 Maven 设置 文件;假设您的存储库已正确配置,此实用程序通常会做得很好。

【讨论】:

    【解决方案2】:

    尝试(将 id ClaudioStas 更改为 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-15
      • 1970-01-01
      相关资源
      最近更新 更多