Maven没有找到依赖项的最后版本

时间:2016-01-28 14:38:53

标签: java maven m2e

我必须在我的pom.xml中包含 fixedformat4j-root 依赖项。 我从项目主页的pom.xml获取工件信息(组,版本,...):

https://github.com/jeyben/fixedformat4j/blob/master/pom.xml

当我将该信息存储到我的pom.xml中时,我从m2e eclipse插件中收到此错误:

  

缺少神器   com.ancientprogramming.fixedformat4j:fixedformat4j根:罐: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.xml中找到存储库URL?

1 个答案:

答案 0 :(得分:0)

您在POM中列出的任何存储库都不包含该工件的该版本。它们每个都包含多个发行版本,但没有快照。

查看此工件的源代码,它看起来似乎是版本1.4.0-SNAPSHOT,但该版本尚未部署到存储库。要么在本地构建它(通过mvn clean install),要么引用给定存储库中的一个版本。

相关问题