[英]maven can't find jar file in JFrog artifactory (snapshot-repo) with third-party libs
My team is using JFrog artifactory and it has a 3rd-party lib deployed to it. 我的团队正在使用JFrog工件,并且已向其部署了3rd-party库。
My settings.xml: 我的settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>dev</id>
<properties>
<artifactory.url>http://myartifactory.com</artifactory.url>
<artifactory.username>blah</artifactory.username>
<artifactory.passwd>blah</artifactory.passwd>
<artifactory.maven.snapshot>maven-integration-local</artifactory.maven.snapshot>
<artifactory.maven.thirdparty>maven-third-party-local</artifactory.maven.thirdparty>
<artifactory.maven.rc>maven-release-candidate-local</artifactory.maven.rc>
<artifactory.maven.release>maven-release-local</artifactory.maven.release>
<artifactory.maven.all>maven-repo</artifactory.maven.all>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>snapshot-repo</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:1</updatePolicy>
</snapshots>
<name>maven-integration-local</name>
<url>http://myartifactory.com</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jcenter</id>
<url>http://jcenter.bintray.com</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>artifactory-plugin</id>
<url>${artifactory.url}/${artifactory.maven.all}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
The artifactory contains a pom, which my own project is dependent on (BOM style import of pom to build my own local project). 工件包含一个pom,这是我自己的项目所依赖的(导入pom的BOM样式以构建我自己的本地项目)。 And it looks like maven is successfully downloading everything FINE until it gets to a specific jar:
看起来maven成功下载了FINE的所有内容,直到到达特定的jar:
Could not resolve dependencies for project xxx:1.1.0: The following artifacts could not be resolved: com.japisoft:xmlpad-res:jar:3.7
无法解析项目xxx:1.1.0的依赖项:无法解析以下工件:com.japisoft:xmlpad-res:jar:3.7
I checked and the jar does indeed exist in the artifactory (xmlpad-res-3.7.jar), but maven claims that it can't find it. 我检查了一下,jar确实存在于工件(xmlpad-res-3.7.jar)中,但是maven声称找不到它。 I tried downloading the jar and installing it using maven install plugin, but this did not help.
我尝试下载jar并使用maven install plugin安装它,但这没有帮助。
Why can't maven find the file and what can I do about it? 为什么Maven找不到文件,我该怎么办?
I encountered the same problem when mistakenly removed/modified the maven .settings file; 错误地删除/修改了maven .settings文件时,我遇到了同样的问题。
To fix that try the following steps: 要解决此问题,请尝试以下步骤:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.