Hello Brian

What you assume is right : if the timestamp of a remote artifact is more
recent than the timestamp of a local artifact (under .m2), it will download
the version from the remote repository. This will be happening depending on
the updatePolicy (daily by default), or if you add -U flag to the command
line.

If you want to be sure that your local changes are picked up every time and
not overriden by a remote snapshot, you have 2 options :
- recompile your local changes to component A at least once a day (with
default value of updatePolicy which is daily)
- set updatePolicy to "never". In this case, Maven will download remote
snapshots artifacts only if you don't already have them locally.

The drawback of the second option is that you'll need to use -U each time
you want new remote snapshots, but at least you won't be surprised.

Hope it answer your interrogations,

Cheers,

Vincent

2010/10/16 <[email protected]>

> My apologies for my previous post.  That's what I get for trying to save a
> step by replying to someone else's post, but forgetting to change the
> subject :-[
>
> Hi all,
>
> I could use some clarification on how SNAPSHOTs work.
>
> Scenario:
>
> - Maven 2.2.1
> - componentB depends on componentA, both are being built as snapshot
> versions.
> - I have the source code for both components locally and have built and
> installed both to my local repo (mvn install)
> - Both components are also built on a CI server and the snapshot artifacts
> are deployed to our in-house Artifactory repo.
>  Builds occur automatically whenever a change is detected by our CI server.
>
> Questions:
>
> Let's say I'm working on componentB. When building componentB, in what
> cases will componentA be downloaded from Artifactory?
> That is, what controls whether I am building componentB against the version
> of componentA that I built and installed in my local repo
> or against a newly-downloaded version that had been deployed to
> Artifactory?
>
> How is all of this affected by the snapshots updatePolicy in my settings?
> By default, does a new version of componentA get downloaded
> every day (assuming a new one has been deployed to Artifactory)?
>
> Thanks.
>
> -brian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Vincent

Reply via email to