java Maven找不到依赖项的最新版本
我必须在pom中包含fixedformat4j root依赖项。xml。 我获得工件信息(组、版本等)来自pom。项目主页的xml:
https://github.com/jeyben/fixedformat4j/blob/master/pom.xml
当我将这些信息存储到我的pom时。xml,我从m2e eclipse插件中得到了这个错误:
Missing artifact com.ancientprogramming.fixedformat4j:fixedformat4j-root:jar:1.4.0-SNAPSHOT
这是我的pom。xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
...
<dependencies>
...
<dependency>
<groupId>com.ancientprogramming.fixedformat4j</groupId>
<artifactId>fixedformat4j-root</artifactId>
<version>1.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray</id>
<url>http://jcenter.bintray.com</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
...
</build>
<reporting>
...
</reporting>
</project>
我如何解决这个错误?我应该设置一个新的存储库吗?在哪里可以从项目pom中找到存储库url。xml
# 1 楼答案
您在POM中列出的存储库都不包含该工件的版本。它们都包含多个发布版本,但没有快照
从这个工件的源代码来看,它似乎是1.4.0-SNAPSHOT版本,但该版本尚未部署到存储库中。要么自己在本地构建(通过mvn clean install),要么引用给定存储库中的一个版本