我需要 jira-rest-java-client:jar:0.2-m1.jar 。所以我在pom.xml
中添加了以下内容(感谢@kahowell对我的previous question to download that的回答)
<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>
依赖是
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>0.2-m1</version>
</dependency>
它正在下载JAR,但同时显示失败,我需要添加更多JAR,而且我的程序也需要一些JAR,因为这个JAR中的一个类调用其他JAR中的其他类,我需要添加到pom .XML。所以我从maven添加了以下依赖项。它的存储库本身就是maven。
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>r06</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
<artifactId>oauth-client</artifactId>
<version>1.12</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
<artifactId>oauth-signature</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client</artifactId>
<version>1.3</version>
</dependency>
现在问题是,当我添加存储库(上面提到的那个)时,maven下载第一个JAR但没有下载剩余并显示错误。当我删除存储库时,maven会下载除第一个之外的所有其他JAR。我认为它与存储库位置相冲突,但我不确定。
任何人都可以帮我解决这个问题吗?
由于
答案 0 :(得分:0)
请尝试将另一个repository
添加到Maven Central
,如下所示: -
<repositories>
...
<repository>
<id>Maven Central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
</repositories>
还有另外一些有用的存储库,如下所示: -
<repositories>
...
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/repositories/public/</url>
</repository>
<repository>
<id>JBoss repository</id>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
我希望这可能有所帮助。