I'm using Hudson 3.0.0 to do Java builds using Maven.
I have a project that builds a client library jar that is used in another project which builds a war. I made some changes to the jar and built a snapshot in Hudson which pushes the artifact to our Nexus repository. When I tried to build a snapshot of the war (with the jar snapshot as a dependency) I got this error:
[ERROR] Failed to execute goal on project Application: Could not resolve dependencies for project my.Application:war:1.13-SNAPSHOT: Could not find artifact my-client:jar:1.9-SNAPSHOT -> [Help 1]
I checked Nexus and the jar is listed in the snapshot repo. When I do a local build of the app, my machine has no issues downloading the snapshot jar and build the war. I did a release build of the jar via Hudson and updated the war project to use this version and Hudson built it without issue.
So, I'm thinking it may be an issue with Hudson, but I can't think what.
And yes, this is one of those cases where "nothing has changed, but now it's not working". Obviously, somethng has changed but I have no idea where to look for it.
I've been trying to find any clue as to what the issue is and have scoured every Hudson/Nexus/Maven log I could find looking for something but so far no luck.
I have another Hudson job that builds a war that depends on one of our library jar files that is a snapshot version. This one is also failing to build because it can't find the snapshot dependency (it worked yesterday).
In both war build jobs, "Private repository" was checked true under the "Invoke Maven 3" build step. However, if I uncheck it for this other war job, the snapshot jar is downloaded from Nexus and the build is successful. I deleted the other job and recreated it by copying the one that works without a private repository. However, it's still unable to resolve the snapshot dependency and continues to fail.
I'm convinced that it is an issue with Hudson but have no idea what.
I'm still trying to find an answer to this issue and today my project that was working with a snapshot dependency isn't, even without "Private repository" unchecked. Again, I don't know what changed.
However, I believe I have nailed the issue down to the fact that Maven isn't downloading the "maven-metadata.xml" file and therefore can't resolve the dependency to the timestamp version. For example, in my local build, I see this in my Maven output: