Maven not able to download dependency
Asked Answered
N

2

6

I have started working on a new project using Maven, and I'm unable to have it work properly on eclipse. I have multiples of this error :

ArtifactTransferException: Failure to transfer com.caucho:hessian:jar:3.1.5 from <repository> was cached in the local repository, resolution will not be reattempted until the update interval of Archiva SIVPN Internal has elapsed or updates are forced. Original error: Could not transfer artifact com.caucho:hessian:jar:3.1.5 from/to Archiva SIVPN Internal (<repository>): No response received after 60000    pom.xml /<file> line 2  Maven Dependency Problem
Description Resource    Path    Location    Type

Missing artifact com.caucho:hessian:jar:3.1.5 pom.xml / line 2 Maven Dependency Problem

After doing some research, I found that it was probably either the pom.xml that's wrong, or that I have proxy problems.

I checked that the resource was available on our repository, and that the pom snippet is the same as declared in my code :

<dependency>
  <groupId>com.caucho</groupId>
  <artifactId>hessian</artifactId>
  <version>3.1.5</version>
</dependency>

My proxy works just fine for the trunk of the project, and there is no other proxy I'm aware of.

I thought it was maybe a one-time connection problem, but making a new maven build with -U didn't resolve the problem.

I also found https://mcmap.net/q/157165/-maven2-missing-artifact-but-jars-are-in-place with several I-don't-know-what-else-to-do solutions, but it didn't work for me...

Since the lead developer is on vacation and I have little experience on mvn, could someone tell me other potential problems that could be responsible for this ?

Thanks in advance for answers :)

Nibelungenlied answered 27/5, 2013 at 10:42 Comment(4)
What I would do is to (re)move a part of your local Maven repo (in ~/.m2/repository), especially the com.caucho part, and build it then. See if maven will correctly download the file. If that doesn't work, enable debugging (-X, I think), and see what that does.Box
Did you look at this question?Hi
I tried to remove the caucho/hessian folder from ~/.m2 and to restart maven. The missing parts were properly downloaded :Nibelungenlied
The missing parts were properly downloaded, but the errors didn't go away. mvn clean and project clean doesn't solve my issue, neither does closing/reopening the projects.Nibelungenlied
M
7

After a failed attempt, maven will leave a small file in your local .m2 repository that will prevent any attempt to re-download the file unless the update interval has elapsed or you force the updates using the maven -U switch described in other answers.

Just delete the folder for that artifact in your local m2 repository and update you project; a new download attempt will trigger.

rm -rf ~/.m2/repository/com/caucho/hessian/3.1.5

Malignity answered 2/7, 2013 at 12:2 Comment(0)
S
8

Open a command prompt, go to your project directory and run: mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true

The eclipse:eclipse portion will regenerate your project files etc, the last 2 properties are more for convenience but I like downloading the sources and javadoc.

Socialite answered 2/7, 2013 at 11:54 Comment(2)
for web application don't forget: -Dwtpversion=2.0Midday
@Saik0 which is why I mentioned that they're merely there for my convenience and why I like using them.Socialite
M
7

After a failed attempt, maven will leave a small file in your local .m2 repository that will prevent any attempt to re-download the file unless the update interval has elapsed or you force the updates using the maven -U switch described in other answers.

Just delete the folder for that artifact in your local m2 repository and update you project; a new download attempt will trigger.

rm -rf ~/.m2/repository/com/caucho/hessian/3.1.5

Malignity answered 2/7, 2013 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.