在使用maven生成项目时,在center中找不到工件



我对Maven完全陌生。我正在使用Maven命令mvn clean package构建Apache项目。它显示构建失败,并给出以下错误消息:

[ERROR] Failed to execute goal on project taverna-perspective-myexperiment: Could not 
resolve dependencies for project org.apache.taverna.workbench:taverna-perspective-
myexperiment:bundle:3.1.0-incubating-SNAPSHOT: Could not find artifact
org.jdom:com.springsource.org.jdom:jar:1.1.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

它似乎需要一个依赖org.jdom.com.springsource.org.jdom:jar:1.1.0,但它找不到。我在互联网上搜索了这个工件,发现了一个页面,给出了以下maven配置:

<dependency>
<groupId>org.jdom</groupId>
<artifactId>com.springsource.org.jdom</artifactId>
<version>1.1.0</version>
<scope>provided</scope>
</dependency>

我检查了pom.xml,发现org.jdom的依赖项与上面的完全相同。我该怎么修?这是否意味着这个人工制品已经从中心移除?我们能为它设定其他来源吗?

在页面中写入注释:

注意:这个工件位于SpringPlugins存储库中(https://repo.spring.io/plugins-release/)

那么您必须添加https://repo.spring.io/plugins-release/到pom.xml文件中的存储库:

<repositories>
<repository>
<id>spring</id>
<name>Spring Repository</name>
<url>https://repo.spring.io/plugins-release/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>com.springsource.org.jdom</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>

最新更新