4
votes

can you let me know if you've seen this problem? My nexus install no longer can find snapshots for internal repositories. I see the jar for the snapshot in question below nexus/content/groups/public but when I execute a simple maven project I get the missing artifact message:

mvn clean package -U -s c:\sandbox\maven-settings.xml
...
Missing:
----------
1) com.bar:foo:jar:1.0.0-SNAPSHOT
Try downloading the file manually from the project website.

Nexus: 1.5.0 Open Source Edition

Mvn: 2.2.1

"Public Repositories" group includes 3rd party/external snapshot and release repositories including my new testsnap that only has com.bar.foo:jar:1.0.0-SNAPSHOT in it.

"Public Snapshot Repositories" group includes testsnap, my internal snapshots repo, apache snapshots and ibiblio

Recently, two internal snapshot/release pairs which I proxy were taken offline at the source

I haven't been cleaning SNAPSHOTS and had 123 GB of them. I just completed a cleanup task yesterday where I dumped about 100GB of snapshots. I started a reindex and it's still processing.

Please let me know if you have any ideas on what I can check. Thanks

Peter ([email protected])

1

1 Answers

4
votes

This was a lesson in assumptions. The problem couldn't have been my maven-settings.xml because

  • I haven't changed it in forever
  • all my other builds work

Well, not so fast... My settings file defined a nexus profile where nexus is mirrorOf all but the section to make that profile the active/default was missing.

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

So, why did it work on my system? I have one hudson handling all the builds and they share a common local maven repo. Most builds consuming 3rd party artifacts when directly to the source for them. Since all hudson jobs deploy artifacts to nexus the "install" phase is executed which means they seed the local maven repo. When a job requiring an internal snapshot executes it pulls it from the local maven repo.

All of this was fine until a new slave was added where only certain jobs ran. The common cache was split between the two and voila a snapshot cannot be found because the build isn't going to nexus to look for dependencies (even though the mvn -X output reported it as such ... which is weird)