【问题标题】:Failure to find org.apache.xalan:xalan:jar:2.7.1 in http://www.eviware.com/repository/maven2/在 http://www.eviware.com/repository/maven2/ 中找不到 org.apache.xalan:xalan:jar:2.7.1
【发布时间】:2013-11-05 05:27:47
【问题描述】:

我正在运行一个从 https://svn.wso2.org/repos/wso2/people/suresh/saml2/sso-demo/src-dist 下载的 maven 项目 问题是,它可以在另一台计算机上运行,​​但我的:(。我不知道为什么。当我在命令行中输入“mvn clean install”时。结果如下:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Travelocity.com SAML2 SP Maven Webapp
[INFO] Avis.Com SAML2 SP Maven Webapp
[INFO] SAML2.SSO.Demo Maven Project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Travelocity.com SAML2 SP Maven Webapp 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.xalan:xalan:jar:2.7.1 is missing, no dependency
 information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Travelocity.com SAML2 SP Maven Webapp ............. FAILURE [0.388s]
[INFO] Avis.Com SAML2 SP Maven Webapp .................... SKIPPED
[INFO] SAML2.SSO.Demo Maven Project ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.579s
[INFO] Finished at: Mon Nov 04 18:10:45 ICT 2013
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project saml2.sso.demo.travelocity.com: Could
not resolve dependencies for project org.wso2.identity:saml2.sso.demo.travelocit
y.com:war:1.0.0-SNAPSHOT: Failure to find org.apache.xalan:xalan:jar:2.7.1 in ht
tp://www.eviware.com/repository/maven2/ was cached in the local repository, reso
lution will not be reattempted until the update interval of xerces-api has elaps
ed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

似乎无法从 a link 下载 xalan.jar。但是我看到maven已经自动下载了xalan-2.7.1.jar。 我不知道如何修复这个错误。请尽快帮助我。我很感激。

【问题讨论】:

    标签: java maven xalan


    【解决方案1】:

    您的项目正在搜索的存储库不包含工件:

    org.apache.xalan:xalan:jar:2.7.1

    它只包含xalan:xalan:jar:2.7.1

    如果您运行 mvn -X compile,您会看到它们是以下的依赖项:

    [DEBUG]    org.opensaml:opensaml:jar:2.2.3:compile
    [DEBUG]       commons-collections:commons-collections:jar:3.1:compile
    [DEBUG]       commons-lang:commons-lang:jar:2.1:compile
    [DEBUG]       velocity:velocity:jar:1.5:compile
    [DEBUG]       org.apache.xerces:xml-apis:jar:2.9.1:runtime
    [DEBUG]       org.apache.xerces:xercesImpl:jar:2.9.1:runtime
    [DEBUG]       org.apache.xerces:resolver:jar:2.9.1:runtime
    [DEBUG]       org.apache.xerces:serializer:jar:2.9.1:runtime
    [DEBUG]       org.apache.xalan:xalan:jar:2.7.1:runtime
    

    如果相信编写此代码的人有意将他们排除在外:

    <exclusion>
         <groupId>xalan</groupId>
         <artifactId>xalan</artifactId>
    </exclusion>
    <exclusion>
         <groupId>xerces</groupId>
         <artifactId>xml-apis</artifactId>
    </exclusion>
    

    但请注意,&lt;groupId&gt; 实际上排除了一个依赖项,它并不是真正的依赖项。您需要通过以下方式更改 pom 中的上述排除项:

    <exclusion>
         <groupId>org.apache.xalan</groupId>
         <artifactId>xalan</artifactId>
    </exclusion>
    <exclusion>
         <groupId>org.apache.xerces</groupId>
         <artifactId>xml-apis</artifactId>
    </exclusion>
    

    对其他潜在的冲突工件遵循相同的模式。

    【讨论】:

    • 请详细告诉我如何解决这个问题。我不知道如何处理这个:(
    • 您看到 groupID 的问题了吗?
    • 我是 SAML 的新手,所以我不知道该怎么做(
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-20
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 2014-02-19
    • 2011-05-21
    相关资源
    最近更新 更多