On Fri, Aug 24, 2012 at 5:27 PM, Laird Nelson <ljnel...@gmail.com> wrote:
> On Fri, Aug 24, 2012 at 1:52 PM, David Hoffer <dhoff...@gmail.com> wrote:
>
>> We have been having nothing but trouble with Nexus and
>> Maven3 with the time-stamped snapshots and all the various metadata
>> files that Nexus spits out (which confuse Maven and IDEs).
>

Let me fill in a few details that aren't quite right in this thread:

Maven produces the maven-metadata.xml files, not Nexus. Nexus is able
to repair them if needed (or if they are missing from another build)
but otherwise the file is untouched. You can repair them by right
clicking the folder in the repository view and selecting repair
metadata.

>
> Oh, so this whole thing is a Nexus problem?  Is that why none of my
> maven-metadata.xml files in my SNAPSHOT directories in my Nexus repository
> feature a <latest> tag

The LATEST tag is completely unrelated to the SNAPSHOT to
timestamp-buildnumber conversion that Maven does. LATEST and RELEASE
are key words that can be used in place of a version in your pom, but
these have been anti-patterns for a long time. When Maven wants to
find the timestamped file, it reads the maven-metadata.xml and looks
for the <timestamp> and <buildnumber> tags:

<versioning>
<snapshot>
<timestamp>20120809.231215</timestamp>
<buildNumber>116</buildNumber>


Latest itself is again generated by Maven, but isn't required for
snapshot resolution.

(mind you, I'm guessing in the dark here about what
> this tag is for, and also guessing that it is used in resolving SNAPSHOTs)?
>  Am I wrong in thinking that these files *should* feature such a tag if
> they are to be useful at all?  Where would I go to learn more information
> about this?
>
> It certainly seems to be the case from others I've talked to that the
> "solution" is "redeploy another SNAPSHOT; that's the only way to get rid of
> this, and we don't know why it happens either".  Surely that can't be the
> case.  Surely there's some way to convince Maven to figure out what the
> latest SNAPSHOT is in a directory?  Or to otherwise help it correct its
> mistaken belief that there are *no* *possible* snapshot resolutions?  Is
> this a rare problem?



A few more things could help narrow this down:
If you read the maven-metadata.xml from the repository, what's in it?
I'm presuming you have the snapshot repository included in a group
repo, which is what Maven is actually reading. When you fetch from
that url, what's in it?

Checking each of those urls would eliminate any negative caching
effects that Nexus might be doing. It would also confirm that the
group repo is configured properly

If those urls both show the correct data as you pasted in the original
post, then check and see what's in your local repo for that location.
It's possible that Maven isn't actually requesting the file from Nexus
and is instead resolving something incorrectly from the local repo.


>
> Thanks for the input, David.
>
> Thanks,
> Laird
>
> --
> http://about.me/lairdnelson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to