我正在我们基于工件的存储库中部署一个名为edireader.jar的特定 jar。在 Artifactory 中 Edireader 的存储库浏览器页面中,显示了以下依赖项。我在模块的 POM.xml 中使用的相同依赖项。
<dependency>
<groupId>com.berryworks</groupId>
<artifactId>edireader</artifactId>
<version>4.7.3</version>
</dependency>
运行 maven install 时遇到以下错误,
“com.berryworks:edireader:jar:4.7.3 (compile)]: Failed to read artifact descriptor for com.berryworks:edireader:jar:4.7.3: Could not find artifact com.berryworks:berryworks:pom:4.7.3 in central (http://SERVER_Name:PORT/artifactory/libs-releases)”
它正在尝试从 SERVER_Name:PORT/artifactory/libs-snapshots/com/berryworks/berryworks/4.7.3/berryworks-4.7.3.pom 下载 jar,这似乎是错误的,因为 jar 位于 //SERVER_Name:PORT/artifactory /simple/libs-releases-local/com/berryworks/edireader/4.7.3/
我尝试更改所有内容,但无法找到问题。我的问题是为什么它在 maven 安装期间没有选择 jar,因为它存在于工件服务器中。
编辑:这是我正在使用的 settings.xml
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-releases</name>
<url>http://SERVER_Name:PORT/artifactory/libs-releases</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshots</name>
<url>http://SERVER_Name:PORT/artifactory/libs-snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-releases</name>
<url>http://SERVER_Name:PORT/artifactory/plugins-releases</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshots</name>
<url>http://SERVER_Name:PORT/artifactory/plugins-snapshots</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>