【问题标题】:Maven dependency for jira-rest-java-client-0.2-m1.jarjira-rest-java-client-0.2-m1.jar 的 Maven 依赖项
【发布时间】:2013-05-02 04:30:01
【问题描述】:

我想使用 maven 下载 jira-rest-java-client-0.2-m1.jar。但我不知道它的依赖关系。

我尝试了以下

<dependency>
    <groupId>com.atlassian.jira</groupId>
    <artifactId>jira-rest-java-client</artifactId>
    <version>0.2-m1</version>
</dependency>

但它没有下载。当我运行mvn compile 时,它会说

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.444s
[INFO] Finished at: Thu May 02 09:53:19 IST 2013
[INFO] Final Memory: 7M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myproject: Could not resolve dependencies for project com.package.myproject:myproject:war:1.0-SNAPSHOT
: Failure to find com.atlassian.jira:jira-rest-java-client:jar:0.2-m1 in http://repository.codehaus.org was cached in the local repository, resolu
tion will not be reattempted until the update interval of codehaus-release-repo has elapsed or updates are forced -> [Help 1]

我可以手动下载 jar。但我想用maven下载它。我怎样才能做到这一点? 谢谢

【问题讨论】:

    标签: maven jira jira-rest-java-api


    【解决方案1】:

    看起来您可以将 Atlassian 的公共存储库添加到您的 settings.xmlpom.xml

    发件人:https://developer.atlassian.com/display/DOCS/Atlassian+Maven+Repositories, 公共回购的网址是http://maven.atlassian.com/public

    谷歌搜索也表明这个 repo URL 也可以工作:https://repository.atlassian.com/maven2

    例如添加到你项目的 pom.xml, 您将添加以下内容作为&lt;project&gt; 的子项:

    <repositories>
      <repository>
        <id>central</id>
        <name>Atlassian Public Repository</name>
        <layout>default</layout>
        <url>http://maven.atlassian.com/public</url>
        <snapshots>
          <enabled>false</enabled>
        </snapshots>
      </repository>
    </repositories>
    

    (如果您已经有一个存储库部分,那么您只需将存储库添加到它)。 如果您想了解更多信息,这里是 pom 的文档:http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

    【讨论】:

    • 谢谢。但我不知道如何添加。你能帮帮我吗?
    • 我在上面添加了更明确的信息。
    猜你喜欢
    • 1970-01-01
    • 2012-07-25
    • 2017-05-20
    • 2015-05-01
    • 2021-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-10
    相关资源
    最近更新 更多