Barrie,

Have you tried running with the "U" option?  This forces maven to check for
snapshot updates.  If you don't specify the U option, maven will check for
updates according to your snapshot update policy interval.  I believe the
default is once a day.

-Evan

On 5/16/07, Barrie Treloar <[EMAIL PROTECTED]> wrote:

On 5/17/07, Brett Porter <[EMAIL PROTECTED]> wrote:
> Hi Zak,
>
> Your interpretation sounds correct, so I'm not sure why that happens
> incorrectly. Do you see this every time, or only in a clean repository?
>
> The metadata file is indeed used to determine the latest - check the
> lastUpdated timestamp inside the file. The locally installed version
> is represented by maven-metadata-local.xml, while the other remote
> repositories are maven-metadata-repository_id.xml.
>
> HTH - if it all looks correct I'd expect it's a bug for us to look at.
>
> Cheers,
> Brett
>
> On 16/05/2007, at 5:55 PM, Zak Jacobson wrote:
>
> > Hi -
> >
> > I have a question about how mvn determines when to pull a snapshot
> > dependency from the local repository vs. the remote repository.  We
> > have the
> > following scenario:
> >
> >  CruiseControl publishes snapshot builds on each successful build.
> >  moduleA depends on moduleB and moduleC, all versions and
> > dependencies are
> > SNAPSHOT versions.
> >
> > If I install moduleC and then install moduleA (different mvn
> > invocations),
> > it appears that installing moduleA pulls the jar from the remote
> > snapshot
> > repository instead of using the local jar that I just installed
> > even if the
> > remote version is older.
> >
> > The behavior we expected to see is that moduleA is built with the
> > latest
> > version of moduleB & moduleC regardless of location (local repo or
> > remote
> > repo).
> >
> > Does mvn use the maven-metadata xml to determine where to get the
> > latest
> > version?  How does it resolve duplicate sources?
> >
> > Hopefully that is clear enough...
> >
> > Thanks-
> > Zak

We are finding the opposite, with Maven 2.0.4 we have an older local
snapshot and Maven is not pulling down the newer CruiseControl
snapshot.

I'm getting the person with this problem to install 2.0.6 and if it
continues to happen I will be  investigating why.  It may be the issue
(still yet to be filed) where the repository location for a resolved
artifact is the repository of the last metadata to be checked.  I
thought local artifacts were treated differently to repositories (but
this is from my vague memory when I was digging through the code).

At the moment our workaround is to rebuild the entire project.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to