When downloading snapshots, we use the If-Modified-Since header. The rules for this header state (from the http1.1 spec)
14.25 If-Modified-Since ... a) If the request would normally result in anything other than a 200 (OK) status, or if the passed If-Modified-Since date is invalid, the response is exactly the same as for a normal GET. A date which is later than the server's current time is invalid.
Note the last line : "A date which is later than the server's current time is invalid."
Now if you just built a snapshot in one project, then move onto another that uses it, there is a chance
that your If-Modified-Since header is ahead of ibiblio / your upstream server.
Thus, the full SNAPSHOT is downloaded over the top of the existing one - even though the
upstream server is in fact serving up an older copy of the snapshot.
I've tested this on hogshead vs. ibiblio and it is what is causing the problem - hogshead time was
30 minutes faster than ibiblio, so my fresh snapshots were getting overwritten by ibiblio's old one.
(hogshead was sending a header that was in the future to ibiblio - and thus ignored).
Cheers,
Ben
Maczka Michal wrote:
Ben: I think that such problem exists and it is certainly not limited to
ibiblio only.
I have the same exact bug when I am working with intranet web server.
I don't know if this is problem of maven it self, web server caching, proxy
server caching etc.
I am too busy to look into it at the moment :( I was forced (lack of time to fix it) to stop working with SNAPSHOTs.
Michal
-----Original Message----- From: Ben Walding [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 4:11 PM To: Maven Users List Subject: Re: multiproject:artifact, SNAPSHOT dependencies and the reposito ry
Nope, Maven does check the date - it uses the http protocol to only download as required. However I think there might be some issues in it - possibly even in the ibiblio web server / dates on the server (see my earlier email today)
I'll take a further look when I code up the snapshot downloader for the maven-proxy.
Kalaveshi, Adrian wrote:
I also don't believe that Maven checks to see which SNAPSHOT
is newer.
Maven seems to always download it -- even if they are
identical. Anyone
have a definitive answer for this? I'm using 1.0-rc1.
Using the "-o" option isn't sufficient enough. I'd like to avoid downloading SNAPSHOT jars of my internal projects (or, I
should say, I'd
like to avoid overwriting the newer SNAPSHOT jar that exists
in my local
repository) but, at the same time, I need to have access to
everything else
in the repository.
-adrian-
-----Original Message----- From: Jörn Gebhardt [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 1:19 AM To: Maven Users List Subject: AW: multiproject:artifact, SNAPSHOT dependencies and the reposito ry
Hi,
That's strange. We have exactly the same problem that Adrian
described. I
believe that Maven doesn't check any dates when resolving SHNAPSHOT dependencies, but just downloads the SNAPSHOT jar from the
remote repository
if it is there.
I've posted a similar message some weeks ago and was advised
to used the -o
(offline) option of Maven (e.g. maven -o jar) to suppress
the download from
the remote server. Alternatively, you can set a property (I
don't remember
02/03/2004the property name, but it's documented somewhere...) in your local build.properties to switch to the offline mode.
Jörn
-----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 2. März 2004 04:20 An: Maven Users List Betreff: Re: multiproject:artifact, SNAPSHOT dependencies and the repository
"Kalaveshi, Adrian" <[EMAIL PROTECTED]> wrote on
08:09:36 AM:
Greetings --multiproject
Is there a best practices document describing maven's role in a
environment?versions of other
One of the problems I'm currently trying to tackle is this:
- internal components have dependencies to SNAPSHOT
created andinternal components. - after each project is compiled, it's SNAPSHOT artifact is
'installed' to the local repository (for use by other projects)We have exactly this.
- when the next project is compiled, it's dependencies are
downloaded from
the repository (overwriting the SNAPSHOT artifact that was
created in the
previous line item)
This doesn't happen for us. We never get a download as our local SNAPSHOT is newer than the one in the remote repo.
-- dIon Gillard, Multitask Consulting
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- 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]