Thank you very much Emmanuel - I ll try to implement this right away :)

Jesper Linvald
MAERSK DATA TRANSPORT
Tel no.: +45 3911 1891
e-mail: [EMAIL PROTECTED]




"Emmanuel Venisse" <[EMAIL PROTECTED]> 
29-04-2004 14:06
Please respond to
"Maven Users List" <[EMAIL PROTECTED]>


To
"Maven Users List" <[EMAIL PROTECTED]>
cc

Subject
Re: Local versus remote repository issue







----- Original Message ----- 
From: "Jesper Linvald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 29, 2004 12:48 PM
Subject: Local versus remote repository issue


> Hello all,
>
>
> I have a very fundamental question about how Maven determine wheter the
> local repository have the latest jar file from the remote repository.
>
> My scenario is that a nightly build puts the same xxx-1.0.jar into the
> remote repository every night. The version number dosent change (that
> would require the developers to specify a new dependency version every
> day) - only the date and maybe other attributes as well.
>
> Does Maven check these attributes to verify whether the newest archive
> exist in the local repository despite of the fact that both local and
> remote repository versions share the same name.
>
> I know that you can specify a dependency to be "SNAPSHOT" but I am not
> sure how this relates to this issue??

Maven always checks the version number of dependencies. If a dependency
isn't a SNAPSHOT, maven checks that the files exists in local repository.
Maven only downloads this dependency if it doesn't exists and if it exists
on local Maven doesn't checks the remote.

In your case, you want to download every day the nexw version, so, you 
must
use the SNAPSHOT version in your project.xml like this
<dependency>
  <groupId>...</groupId>
  <artifactId>...</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

For resume, a SNAPSHOT version is a development version and a non-SNAPSHOT
version is a final release.

Emmanuel


>
> Regards
>
> Jesper Linvald
>


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


Reply via email to