You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by hujirong <ji...@gmail.com> on 2012/07/09 15:28:07 UTC

How does Maven download the latest snapshot from Nexus?

Hi

When we use Maven with Nexus's snapshot repository, how does Maven know
which one to use? I can see we continuously create new snapshots with the
same version but a different timestamp, and Maven will already take the
latest one to download?

Thanks
Jirong

--
View this message in context: http://maven.40175.n5.nabble.com/How-does-Maven-download-the-latest-snapshot-from-Nexus-tp5713434.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How does Maven download the latest snapshot from Nexus?

Posted by Wayne Fay <wa...@gmail.com>.
>> The magic is inside maven-metadata.xml that will be generated while uploading.
>
> And who is responsible for generating the meta-data . . . the repository? Or Maven itself?

"mvn deploy" should handle that for you. But some MRM offer features
involving this file as well.

Wayne

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


RE: How does Maven download the latest snapshot from Nexus?

Posted by Ch...@emc.com.
> The magic is inside maven-metadata.xml that will be generated while uploading.

And who is responsible for generating the meta-data . . . the repository? Or Maven itself?  

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


Re: How does Maven download the latest snapshot from Nexus?

Posted by Martin Eisengardt <ma...@gmail.com>.
The magic is inside maven-metadata.xml that will be generated while
uploading.

Re: How does Maven download the latest snapshot from Nexus?

Posted by Thomas Broyer <t....@gmail.com>.
On Mon, Jul 9, 2012 at 3:28 PM, hujirong <ji...@gmail.com> wrote:
> Hi
>
> When we use Maven with Nexus's snapshot repository, how does Maven know
> which one to use? I can see we continuously create new snapshots with the
> same version but a different timestamp, and Maven will already take the
> latest one to download?

When you publish a new snapshot, you also update the
maven-metadata.xml in the same folder. This is where the mapping
between "SNAPSHOT" and a specific timestamp is done.

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


Re: How does Maven download the latest snapshot from Nexus?

Posted by Ron Wheeler <rw...@artifact-software.com>.
You got it!

If it took random SNAPSHOTs or anything other than the latest, we all 
would be in a state of chaos and never using Maven again.

Maven is used by tens of thousands of people every day.
It works in a way that makes people adopt it as the lynch pin of their 
development methodology.

My personal view of SNAPSHOTs is that my team is only supposed to deploy 
a SNAPSHOT to the repo if they are personally guarantying that it works 
according to some spec - verbal or e-mailed - ("this version of method 
xxx always returns true regardless of arguments passed" or "this version 
always returns customer 'dummy1' with a balance outstanding of $99.00" 
or "this version has getCustomerOrders fully functional but 
getCustomerInvoices always returns 3 dummy invoices").
Deployment of SNAPSHOTs may have to be coordinated with consumers of the 
artifact to be sure that they do not get surprised by their tests 
suddenly returning unexpected results.

In theory

Private use of SNAPSHOTS (mvn install) are the programmers own business. 
of course.

Ron


On 09/07/2012 9:28 AM, hujirong wrote:
> Hi
>
> When we use Maven with Nexus's snapshot repository, how does Maven know
> which one to use? I can see we continuously create new snapshots with the
> same version but a different timestamp, and Maven will already take the
> latest one to download?
>
> Thanks
> Jirong
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/How-does-Maven-download-the-latest-snapshot-from-Nexus-tp5713434.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: How does Maven download the latest snapshot from Nexus?

Posted by Aliaksei Lahachou <al...@gmail.com>.
Hi!

By default, Maven updates snapshots only once per day. You can force
snapshot update by adding the -U option.


Regards,
htfv (Aliaksei Lahachou)


On Mon, Jul 9, 2012 at 3:28 PM, hujirong <ji...@gmail.com> wrote:

> Hi
>
> When we use Maven with Nexus's snapshot repository, how does Maven know
> which one to use? I can see we continuously create new snapshots with the
> same version but a different timestamp, and Maven will already take the
> latest one to download?
>
> Thanks
> Jirong
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-does-Maven-download-the-latest-snapshot-from-Nexus-tp5713434.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>