Issue
I want to download jira-rest-java-client-0.2-m1.jar using maven. But I dont know the dependency for that.
I tried the following
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>0.2-m1</version>
</dependency>
But it is not downloading. When I run mvn compile
it says
[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]
Manually I am able to download the jar. But I want to download it using maven. How can I do that? Thanks
Solution
Looks like you can probably just add Atlassian's public repo to your settings.xml
or your pom.xml
.
From: https://developer.atlassian.com/display/DOCS/Atlassian+Maven+Repositories, the url for the public repo is http://maven.atlassian.com/public
Google searches also suggest this repo URL might work as well: https://repository.atlassian.com/maven2
For example to add to your project's pom.xml,
you would add the following as a child of <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>
(If you already have a repositories section, then you would just add the repository to it). Here is the documentation for the pom if you would like a little more info: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
Answered By - kahowell
Answer Checked By - Willingham (JavaFixing Volunteer)