为什么我在eclipse中获取不到wss4j maven依赖?

Why can't I get the wss4j maven dependency in eclipse?

我总是从 http://mvnrepository.com 获得我的依赖项。每次都工作。但我似乎无法让 wss4j 工作。我的 POM 是这样的:

<dependencies>
 <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>4.2.1.RELEASE</version>
 </dependency>
 <dependency>
    <groupId>org.apache.wss4j</groupId>
    <artifactId>wss4j</artifactId>
    <version>2.1.3</version>
 </dependency>
</dependencies>

我可以很好地得到 Spring,但我总是收到 "Can't find dependency" 错误。我什至使用了 -U 选项,我得到了这个:

Downloading: http://repo1.maven.org/maven2/org/org/apache/wss4j/wss4j/2.1.3/wss4j-2.1.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/wss4j/wss4j/2.1.3/wss4j-2.1.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.411s
[INFO] Finished at: Sat Oct 10 14:31:51 EDT 2015
[INFO] Final Memory: 9M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project crypt.lib: Could not resolve dependencies for project mmaceachran:crypt.lib:jar:0.0.1-SNAPSHOT: Could not find artifact org.apache.wss4j:wss4j:jar:2.1.3 in mvnrepository (http://repo1.maven.org/maven2/org/) -> [Help 1]

但是有正在下载!!!我做错了什么?

更新:
我使用了 -e 选项,但发现它找不到工件:

Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.wss4j:wss4j:jar:2.1.3 in central (https://repo.maven.apache.org/maven2)

但它显然存在:http://repo1.maven.org/maven2/org/apache/wss4j/wss4j/2.1.3/

不,它不存在:您在 pom 中声明的工件没有 <type>。即:默认情况下,Maven 假定 jar 类型。查看您发布的 URL 并发现没有 .jar 工件。

当然需要指定一个type=pom。

从 WSS4J 2.x 开始,org.apache.wss4j/wss4j 模块仅用作网站生成的一部分。您可能想要的依赖项是 org.apache.wss4j/wss4j-ws-security-dom.