mosgjig
mosgjig

Reputation: 537

Sonatype Nexus not recognizing exisiting jars in remote repo

Nexus is having difficulty retrieving jars (spring-*) from central repo. If Nexus is avoided and the project pom simply goes to the repo itself, the jars are downloaded no problem. However, when going through our local central repo (Nexus), the jars are not downloaded even though they can be seen in the "Browse Remote" tab of the repository browser.

Checksum is set to "Warn" Not Found Cache TTL has been set to "-1"

The effected jars are mostly spring with different jars not being recognized depending on 3.1.1.RELEASE vs. 3.1.0.RELEASE

The same issue occurs whether hitting maven central or springs own repo.

Maven version is 3.0.4

Nexus version is 2.0.2

I run a build with "clean install -U -X" and get the following...

Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.springframework:spring-jdbc:jar:3.1.1.RELEASE in nexus (http://our.localRepo.com/nexus/content/groups/public)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)

I have also tried manually deleting the offending artifact entries in Nexus through the artifact search/browsing section of nexus.

Some jars are recognized and others arent... what gives?

Any suggestions? Adding these jars manually to our third party locally hosted repo is not desired for such common dependencies.

Upvotes: 3

Views: 1653

Answers (1)

Brian Fox
Brian Fox

Reputation: 6832

This tests out ok locally. I think the problem is you've set the negative cache to forever (-1) which could cause trouble downloading recently added artifacts...which seems to correlate with your issue. Set the nfc back to 1440 and then run an expire cache on org/springframework and that should help.

Upvotes: 3

Related Questions