我的Play依赖项文件中有以下配置(缩短)!应用:

require:
    - play
    - org.apache.commons -> commons.lang3 3.1

repositories:
    - maven:
        type: iBiblio
        root: "http://repo1.maven.org/maven2/"
        contains:
            - org.apache.commons -> commons.lang3


但是,玩!无法获取commons.lang包。我收到错误消息:

:::: WARNINGS
                module not found: org.apache.commons#commons.lang3;3.1

        ==== maven: tried

          http://repo1.maven.org/maven2/org/apache/commons/commons.lang3/3.1/commons.lang3-3.1.pom
          -- artifact org.apache.commons#commons.lang3;3.1!commons.lang3.jar:

          http://repo1.maven.org/maven2/org/apache/commons/commons.lang3/3.1/commons.lang3-3.1.jar
                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.apache.commons#commons.lang3;3.1: not found

                ::::::::::::::::::::::::::::::::::::::::::::::


search.maven.org之后,它应该位于中央存储库中。

怎么了

最佳答案

Commons LangartifactId是commons-lang3而不是commons.lang3。因此,URL是http://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.pom而不是http://repo1.maven.org/maven2/org/apache/commons/commons.lang3/3.1/commons.lang3-3.1.pom

关于java - 如何使用Play框架下载commons.lang?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9574464/

10-12 19:05