Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven issue ArtifactDescriptorException

I am trying the Spring REST example exaplained here. The project source is here here.

I unzipped the file and renamed top folder to 'myproject' and imported it into eclipse as an existing maven project. But, observed that lot of compilation issues due to missing spring jars. I guess this is because maven is not able to import these jars. When I check the pom.xml, I see eclipse is complaining with below errors:

ArtifactDescriptorException: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.2.2: ArtifactResolutionException: Failure to transfer com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.pom

and

ArtifactDescriptorException: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.2.2: ArtifactResolutionException: Failure to transfer com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:pom:2.2.2 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.2/jackson-databind-2.2.2.pom

I am new to maven so struggling here. Please help me how to fix it.

Thank you.

like image 764
texpert Avatar asked Oct 08 '13 11:10

texpert


People also ask

What is artifact descriptor in Maven?

Provides information about an artifact that is relevant to transitive dependency resolution. Each artifact is expected to have an accompanying artifact descriptor that among others lists the direct dependencies of the artifact.

What does Maven dependency plugin do?

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.


2 Answers

For me, it was because Eclipse was caching the exception. Try to:

right click on project -> maven -> update-project -> force to update snapshot/release -> OK.

It worked for me for the same problem.

like image 196
Saman Abdolmohammadpour Avatar answered Sep 18 '22 23:09

Saman Abdolmohammadpour


try this helped me

right click on project -> maven -> update-project -> force to update snapshot/release -> OK.

like image 40
Umesh Bhutada Avatar answered Sep 19 '22 23:09

Umesh Bhutada