jira-rest-java-client-0.2-m1.jar的Maven依赖

时间:2013-05-02 04:30:02

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

我想使用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 appanalytix: Could not resolve dependencies for project com.vlx.appanalytix:appanalytix: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下载它。我怎样才能做到这一点? 感谢

1 个答案:

答案 0 :(得分:4)

您似乎可以将Atlassian的公共回购添加到settings.xmlpom.xml

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

Google搜索还建议此repo网址也可以使用:https://repository.atlassian.com/maven2

例如,要添加到项目的pom.xml中, 你会将以下内容添加为<project>的孩子:

<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