8

I have been assigned a task to implement SAML between my company and a client. I was looking at using OpenSAML but I am struggling to set up the maven project.

I add the dependency:

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

but the pom file has an error: Missing artifact xerces:xml-apis:jar:1.4.01

I cant find this dependency in the maven repository. When checking the OpenSAML site it states:

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

But when i configure that respository in my pom file, it still cant find the dependency.

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

Has anyone got OpenSAML set up in Maven that can help?

Craig
  • 199
  • 1
  • 2
  • 11

1 Answers1

6

Have you also added the xmltooling and openws dependencies to your POM file from the repository:

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>

The xmltooling should have the xerces xml-api that is missing.

Thanks, Yogesh

Yogesh Chawla
  • 1,583
  • 18
  • 16
  • 4
    To solve my problem i used three different versions of the opensaml, xmltooling and openws dependencies that are in maven AND do not rely on xerces. The dependencies are: org.opensaml opensaml 2.5.1-1 org.opensaml openws 1.4.2-1 org.opensaml xmltooling 1.3.2-1 – Craig Dec 20 '12 at 11:57
  • @Craig Are these the version numbers to use SAMLv2 ? – james2611nov Nov 07 '16 at 16:27