Or you can add <updatePolicy>always</updatePolicy> to your settings.xml's repository section and make releases and/or snapshots always update which should be the default behavior IMHO.
-Dave -----Original Message----- From: Eric Redmond [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 2:57 PM To: Maven Users List Subject: Re: Question on updatePolicy and the way it relates to snapshots On 8/21/07, Farhan Sarwar <[EMAIL PROTECTED]> wrote: > > I see..so its just the updatePolicy settings which makes maven handle > the snapshot in a particular way... Yeah, pretty much. Anyways..another scenario i was just wondering about when one has a > remote-repository cache and that is ..lets say there exist three > snapshots versions > of an artifact "xyz-1.0-SNAPSHOT" 1) in the local-cache ( i.e. > .m2/repository) 2) another version (or a copy you can say) which is > more upto-date exists in the remote-repository-cache you are > maintaining (in artifactory in my case) 3) yet another copy (which is > the latest of all) in the maven public repository, so in the above > scenario would maven just settle down for the later version your > repo-cache has ? or in this particular case the Repository Manager > would basically get the latest version from the maven public repo > (given the one it has is not latest) and hence maven build would get > the latest from the public repository. Depends on when you last ran a build. updatePolicy is daily, by default, but you can force the snapshot to update immediately with the -U flag in the command-line. -- Eric Redmond http://blog.propellors.net Farhan. > > > Please comment.. > > Thanks and Regards, > > Farhan. > > > > On 8/21/07, Eric Redmond <[EMAIL PROTECTED]> wrote: > > On 8/21/07, Farhan Sarwar <[EMAIL PROTECTED] > wrote: > > > > > > Hello Guys, > > > > > > Got a question relating to the updatePolicy tag in the maven > > > repository configuration, so basically an updatePolicy can have one of > > > the 4 possible values i.e. always,daily,interval:X (in minutes) and > > > never. Now my understanding of the way maven handles Snapshot > > > version(s) is that it will always check for a new SNAPSHOT version in > > > a remote repository for every build (unlike regular versions), now > > > given that if i change the value for updatePolicy to for example > > > "never", would this behaviour (which i assume is build into it) change > > > > ? > > > > > > Yes, that is why the updatePolicy element exists. > > > > if yes, dont u think we can mimic the same behaviour with releases > > > by changing the value of updatePolicy to always, and hence it would > > > always get the latest from the remote-repo. > > > > > > You could, but it would slow down everything immensely, since now Maven > has > > to check the remote repo for released artifacts, which has a cost > (increased > > network traffic, latency) > > > > -- > > Eric Redmond > > http://blog.propellors.net > > > > Thanks and Regards, > > > > > > Farhan. > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- Eric Redmond http://blog.propellors.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
