You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Graham Leggett <mi...@sharp.fm> on 2003/04/25 15:46:32 UTC

Maven downloads snapshots on every invocation - why?

Hi all,

As part of the dependancies for including torque in my mavenised 
project, I need to include two jars which are snapshot versions.

For some very odd reason, maven insists on redownloading these snapshots 
on every invocation, which makes our build process take one hell of a 
long time.

Surely it would be more logical to have maven do a conditional check as 
to whether the snapshot is up to date (using an If-Modified-Since) 
rather than having the snapshot downloaded over and over again?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


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


Re: Maven downloads snapshots on every invocation - why?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Fri, 2003-04-25 at 10:14, Rafal Krzewski wrote:
> Graham Leggett wrote:
> > Surely it would be more logical to have maven do a conditional check as
> > to whether the snapshot is up to date (using an If-Modified-Since)
> > rather than having the snapshot downloaded over and over again?
> 
> SNAPSHOT implemenation in Maven is rather flawed at the moment. Ideally
> it should download a very small text file that contains the name of the
> most recently deployed timestamped version of the artifact in question.

Why is downloading the text file better than just checking the
timestamp? Is there a problem with proxies or something?

> Then, your local repository should be checked, for the presence of that
> version and if you have it you are all set, otherwise that version
> would be downloaded and then used. The text file mentioned above should
> be modfied every time a timestamped artifact is deployed to the repo.
> 
> At this moment using a HTTP proxy on your LAN or your own machine is the
> recomended way of retaining your sanity while working with Maven.
> 
> R.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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


Re: Maven downloads snapshots on every invocation - why?

Posted by Graham Leggett <mi...@sharp.fm>.
Rafal Krzewski wrote:

> SNAPSHOT implemenation in Maven is rather flawed at the moment. Ideally
> it should download a very small text file that contains the name of the
> most recently deployed timestamped version of the artifact in question.
> Then, your local repository should be checked, for the presence of that
> version and if you have it you are all set, otherwise that version
> would be downloaded and then used. The text file mentioned above should
> be modfied every time a timestamped artifact is deployed to the repo.

Or maven could simply issue an If-Modified-Since conditional request on 
the attempt to fetch the file. If the file has changed, the server will 
send the file. If the file has not changed, maven will receive a 304 Not 
Modified and no file. This is significantly less work than trying to 
write your own update system.

> At this moment using a HTTP proxy on your LAN or your own machine is the
> recomended way of retaining your sanity while working with Maven.

We have a transparent proxy, but this hasn't seemed to help :(

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


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


Re: Maven downloads snapshots on every invocation - why?

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Graham Leggett wrote:
> Surely it would be more logical to have maven do a conditional check as
> to whether the snapshot is up to date (using an If-Modified-Since)
> rather than having the snapshot downloaded over and over again?

SNAPSHOT implemenation in Maven is rather flawed at the moment. Ideally
it should download a very small text file that contains the name of the
most recently deployed timestamped version of the artifact in question.
Then, your local repository should be checked, for the presence of that
version and if you have it you are all set, otherwise that version
would be downloaded and then used. The text file mentioned above should
be modfied every time a timestamped artifact is deployed to the repo.

At this moment using a HTTP proxy on your LAN or your own machine is the
recomended way of retaining your sanity while working with Maven.

R.


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


Re: Maven downloads snapshots on every invocation - why?

Posted by Ben Walding <de...@walding.com>.
I've checked in some changes that should restore the original behaviour.

Ben Walding wrote:

> I broke it when I stopped it from allowing half complete downloads 
> from staying in the repository.
>
> I'll have a look at it now.
>
> Jason van Zyl wrote:
>
>> On Fri, 2003-04-25 at 09:46, Graham Leggett wrote:
>>  
>>
>>> Hi all,
>>>
>>> As part of the dependancies for including torque in my mavenised 
>>> project, I need to include two jars which are snapshot versions.
>>>
>>> For some very odd reason, maven insists on redownloading these 
>>> snapshots on every invocation, which makes our build process take 
>>> one hell of a long time.
>>>   
>>
>>
>> That is the purpose of the snapshot. A snapshot is considered a failed
>> dependency _always_ so maven will attempt to download it again to make
>> sure it's not out-of-date. If you need a non-released version then use
>> the timestamped version.
>>
>>  
>>
>>> Surely it would be more logical to have maven do a conditional check 
>>> as to whether the snapshot is up to date (using an 
>>> If-Modified-Since) rather than having the snapshot downloaded over 
>>> and over again?
>>>   
>>
>>
>> If maven is actually downloading them again then there's probably some
>> date error happening on your end. It should not actually download if you
>> have the latest version but it makes the attempt to check the date.
>>
>>  
>>
>>> Regards,
>>> Graham
>>>   
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



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


Re: Maven downloads snapshots on every invocation - why?

Posted by Ben Walding <de...@walding.com>.
I broke it when I stopped it from allowing half complete downloads from 
staying in the repository.

I'll have a look at it now.

Jason van Zyl wrote:

>On Fri, 2003-04-25 at 09:46, Graham Leggett wrote:
>  
>
>>Hi all,
>>
>>As part of the dependancies for including torque in my mavenised 
>>project, I need to include two jars which are snapshot versions.
>>
>>For some very odd reason, maven insists on redownloading these snapshots 
>>on every invocation, which makes our build process take one hell of a 
>>long time.
>>    
>>
>
>That is the purpose of the snapshot. A snapshot is considered a failed
>dependency _always_ so maven will attempt to download it again to make
>sure it's not out-of-date. If you need a non-released version then use
>the timestamped version.
>
>  
>
>>Surely it would be more logical to have maven do a conditional check as 
>>to whether the snapshot is up to date (using an If-Modified-Since) 
>>rather than having the snapshot downloaded over and over again?
>>    
>>
>
>If maven is actually downloading them again then there's probably some
>date error happening on your end. It should not actually download if you
>have the latest version but it makes the attempt to check the date.
>
>  
>
>>Regards,
>>Graham
>>    
>>



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


RE: Maven downloads snapshots on every invocation - why?

Posted by Vincent Massol <vm...@pivolis.com>.
Jason,

It was working fine before and I believe this is a bug introduced in
Maven b9.

Thanks
-Vincent

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@zenplex.com]
> Sent: 25 April 2003 15:52
> To: Maven Users List
> Subject: Re: Maven downloads snapshots on every invocation - why?
> 
> On Fri, 2003-04-25 at 09:46, Graham Leggett wrote:
> > Hi all,
> >
> > As part of the dependancies for including torque in my mavenised
> > project, I need to include two jars which are snapshot versions.
> >
> > For some very odd reason, maven insists on redownloading these
snapshots
> > on every invocation, which makes our build process take one hell of
a
> > long time.
> 
> That is the purpose of the snapshot. A snapshot is considered a failed
> dependency _always_ so maven will attempt to download it again to make
> sure it's not out-of-date. If you need a non-released version then use
> the timestamped version.
> 
> > Surely it would be more logical to have maven do a conditional check
as
> > to whether the snapshot is up to date (using an If-Modified-Since)
> > rather than having the snapshot downloaded over and over again?
> 
> If maven is actually downloading them again then there's probably some
> date error happening on your end. It should not actually download if
you
> have the latest version but it makes the attempt to check the date.
> 
> > Regards,
> > Graham
> --
> jvz.
> 
> Jason van Zyl
> jason@zenplex.com
> http://tambora.zenplex.org
> 
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
> 
>   -- Jacques Ellul, The Technological Society
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



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


Re: Maven downloads snapshots on every invocation - why?

Posted by Jason van Zyl <ja...@zenplex.com>.
On Fri, 2003-04-25 at 09:46, Graham Leggett wrote:
> Hi all,
> 
> As part of the dependancies for including torque in my mavenised 
> project, I need to include two jars which are snapshot versions.
> 
> For some very odd reason, maven insists on redownloading these snapshots 
> on every invocation, which makes our build process take one hell of a 
> long time.

That is the purpose of the snapshot. A snapshot is considered a failed
dependency _always_ so maven will attempt to download it again to make
sure it's not out-of-date. If you need a non-released version then use
the timestamped version.

> Surely it would be more logical to have maven do a conditional check as 
> to whether the snapshot is up to date (using an If-Modified-Since) 
> rather than having the snapshot downloaded over and over again?

If maven is actually downloading them again then there's probably some
date error happening on your end. It should not actually download if you
have the latest version but it makes the attempt to check the date.

> Regards,
> Graham
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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


Re: Maven downloads snapshots on every invocation - why?

Posted by Andrew Geery <ge...@doc.state.sc.us>.
See 
http://maven.apache.org/reference/user-guide.html#Using%20SNAPSHOT%20Dependencies
"Internally to Maven SNAPSHOT dependencies are always considered failed 
dependencies. That being the case Maven will always try to retrieve a 
copy of SNAPSHOT dependency from the Maven repository."

To "disable" this behavior, see
http://maven.apache.org/reference/user-guide.html#Building%20Offline

HTH
Andrew

Graham Leggett wrote:

> Hi all,
>
> As part of the dependancies for including torque in my mavenised 
> project, I need to include two jars which are snapshot versions.
>
> For some very odd reason, maven insists on redownloading these 
> snapshots on every invocation, which makes our build process take one 
> hell of a long time.
>
> Surely it would be more logical to have maven do a conditional check 
> as to whether the snapshot is up to date (using an If-Modified-Since) 
> rather than having the snapshot downloaded over and over again?
>
> Regards,
> Graham



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