simar kaur
simar kaur

Reputation: 221

Maven dependency in eclipse

I am trying to use jersey API and this is my first maven project.

I have 2 maven dependency problems that look like this:

Description Resource    Path    Location    Type
ArtifactTransferException: Failure to transfer org.glassfish.hk2:osgi-resource-locator:jar:1.0.1 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 org.glassfish.hk2:osgi-resource-locator:jar:1.0.1 from/to central (http://repo.maven.apache.org/maven2)

Description Resource    Path    Location    Type
Missing artifact org.glassfish.hk2:osgi-resource-locator:jar:1.0.1  

How should I go about to fix this?

Upvotes: 1

Views: 1036

Answers (2)

Sunil
Sunil

Reputation: 492

Remove all your failed downloads from

For windows:

cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i

Then rightclick on your project in eclipse and choose Maven->Update Dependencies

Upvotes: 1

Ziker
Ziker

Reputation: 906

Possible solutions

  1. Delete your repo in home folder then build with force Update Snapshot option
  2. Copy paste link in error trace into your browser if didnt work you have to create settings.xml file in your repo home folder and set proxy if you are using them

Upvotes: 0

Related Questions