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

标签 java eclipse maven wss4j

我总是从 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,但我一直收到“找不到依赖项”错误。我什至使用了 -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 选项,但发现它找不到 Artifact :

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/

最佳答案

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

冷静。

关于java - 为什么我在eclipse中获取不到wss4j maven依赖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33057607/

相关文章:

java - 并行流终止定义明确吗?

java - 如何在 Java 可执行文件 .jar 中启动多个主程序?

java - Jersey 资源类未导出

java - 无法使用 java -jar 执行 maven 生成的 jar 文件

java - 有没有办法处理 JAXB 中多个 .xsd 文件中的重复元素定义?

java - 字符串到 float 的转换

eclipse - 找不到所需的插件 'org.eclipse.pde.junit.runtime'

android - 将 JSON String 转换为 JSON Array 并显示在 ListView 中

java - 使用 Maven 进行选择性构建

java - Maven:pom编译后添加了不同版本的slf4 jar,war因此出现版本冲突错误