【问题标题】:Maven OpenSAML dependency issueMaven OpenSAML 依赖问题
【发布时间】:2012-12-13 17:39:43
【问题描述】:

我被分配了在我的公司和客户之间实施 SAML 的任务。我正在考虑使用 OpenSAML,但我正在努力设置 maven 项目。

我添加依赖:

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

但是pom文件有错误:Missing artifact xerces:xml-apis:jar:1.4.01

我在 maven 存储库中找不到此依赖项。检查 OpenSAML 站点时,它指出:

在基于 Maven 的项目中使用 OpenSAML

以下是在内部使用 OpenSAML 所需的信息 基于 Maven 的项目。 Maven 存储库: https://build.shibboleth.net/nexus/content/repositories/releases集团 ID:org.opensaml 工件 ID:opensaml

但是当我在我的 pom 文件中配置该存储库时,它仍然找不到依赖项。

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

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

【问题讨论】:

    标签: maven dependencies opensaml


    【解决方案1】:

    您是否还从存储库将 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。

    谢谢, 尤格什

    【讨论】:

    • 为了解决我的问题,我使用了 maven 中的三个不同版本的 opensaml、xmltooling 和 openws 依赖项,并且不依赖于 xerces。依赖项是: org.opensamlopensaml2.5.1-1org.opensaml openws1.4.2-1org.opensamlxmltooling1.3.2-1
    • @Craig 这些是使用 SAMLv2 的版本号吗?
    猜你喜欢
    • 2020-10-21
    • 1970-01-01
    • 2021-12-06
    • 2011-10-17
    • 1970-01-01
    • 1970-01-01
    • 2022-11-26
    • 2021-08-10
    • 2014-01-12
    相关资源
    最近更新 更多