2012-12-13 148 views
6

我已经分配了一个任务来在我的公司和客户端之间实现SAML。我正在研究使用OpenSAML,但我正在努力设置maven项目。Maven OpenSAML依赖项问题

我添加的依赖:

<dependency> 
<groupId>org.opensaml</groupId> 
<artifactId>opensaml</artifactId> 
<version>2.5.1</version> 
</dependency> 

但POM文件有错误:缺少神器的Xerces:XML的API中:jar:1.4.01

我不能找到在Maven仓库这种依赖性。当检查OpenSAML网站它指出:

Using OpenSAML in Maven-based Projects

Following is the information necessary to use OpenSAML within Maven-based projects. Maven Repository: https://build.shibboleth.net/nexus/content/repositories/releases Group ID: org.opensaml Artifact ID: opensaml

但是,当我配置程序存储库在我的POM文件,但它仍然无法找到的依赖。

<repositories> 
    <repository> 
     <id>org.opensaml</id> 
     <url>https://build.shibboleth.net/nexus/content/repositories/releases</url> 
    </repository> 
</repositories> 

是否有人在Maven中设置了OpenSAML可以提供帮助?

回答

4

你有没有也从仓库中添加的xmltooling和openws依赖于你的POM文件:

https://build.shibboleth.net/nexus/content/repositories/releases/org/opensaml/

<dependency> 
<groupId>org.opensaml</groupId> 
<artifactId>xmltooling</artifactId> 
<version>1.3.2</version> 
</dependency> 

<dependency> 
<groupId>org.opensaml</groupId> 
<artifactId>openws</artifactId> 
<version>1.4.2</version> 
</dependency> 

的xmltooling应该是缺少了Xerces XML的API。

感谢, 约杰什

+0

谢谢你提醒我添加其他两个依赖。 – Craig

+2

为了解决我的问题,我使用了三个不同版本的opensaml,xmltooling和openws依赖,这些依赖在maven中,并且不依赖于xerces。依赖项: \t \t \t \t \t org.opensaml \t \t \t opensaml \t \t \t 2.5.1-1 \t \t \t \t \t \t \t org.opensaml \t \t \t openws \t \t \t 1.4.2-1 \t \t \t \t \t \t \t org.opensaml \t \t \t xmltooling \t \t \t 1.3。2-1 \t \t Craig

+0

@克雷格同样的问题。您的解决方案帮助了我,谢谢。 –