2012-12-13 30 views
6

Tôi đã được chỉ định một nhiệm vụ để triển khai SAML giữa công ty của tôi và khách hàng. Tôi đã xem xét sử dụng OpenSAML nhưng tôi đang đấu tranh để thiết lập dự án maven.Vấn đề phụ thuộc Maven OpenSAML

tôi thêm các phụ thuộc:

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

nhưng các tập tin pom có ​​một lỗi: Thiếu xerces vật: xml-apis: jar: 1.4.01

tôi không thể tìm thấy sự phụ thuộc này trong kho maven . Khi kiểm tra trang web OpenSAML, tiểu bang nêu rõ:

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

Nhưng khi tôi định cấu hình kho lưu trữ trong tệp pom của mình, nó vẫn không thể tìm thấy sự phụ thuộc.

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

Có ai có OpenSAML được thiết lập trong Maven có thể trợ giúp không?

Trả lời

4

Bạn cũng thêm xmltooling và openws phụ thuộc vào tập tin POM của bạn từ kho:

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> 

Các xmltooling nên có xerces xml-api đó là mất tích.

Cảm ơn, Yogesh

+0

Cảm ơn bạn đã nhắc tôi thêm hai phụ thuộc còn lại. – Craig

+2

Để giải quyết vấn đề của tôi, tôi đã sử dụng ba phiên bản khác nhau của các phụ thuộc opensaml, xmltooling và openws có trong maven AND không dựa vào xerces. Sự phụ thuộc là: \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

@Craig Cùng một vấn đề. Giải pháp của bạn đã giúp tôi, cảm ơn. –