Hi, I used TCPMon to find out what requests and responses are sent. The headers looked like this:
Request: ---------------------------------------------------------------------------- GET /maven//jabba-cartridge/jars/jabba-cartridge-1.1-SNAPSHOT.jar HTTP/1.1 User-Agent: Java/1.4.1_02 Host: wka-wn-f2t13b Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive If-Modified-Since: Tue, 09 Mar 2004 17:11:15 GMT ---------------------------------------------------------------------------- --- Response: ---------------------------------------------------------------------------- --- HTTP/1.1 200 OK Server: Resin/2.1.8 ETag: "AAAAPsbKS+R" Last-Modified: Fri, 05 Mar 2004 13:14:35 GMT Expires: Tue, 09 Mar 2004 19:02:13 GMT Content-Length: 145796 Date: Tue, 09 Mar 2004 19:02:08 GMT --> File content ---------------------------------------------------------------------------- ------------- However, if I have the same version of a jar on my local machine and on the HTTP Server, I get the following Request/Response: Request: ---------------------------------------------------------------------------- GET /maven//jabba-modules/jars/jabbabase-server-iutest-1.1-SNAPSHOT.jar HTTP/1.1 User-Agent: Java/1.4.1_02 Host: wka-wn-f2t13b Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive If-Modified-Since: Fri, 05 Mar 2004 15:39:56 GMT ---------------------------------------------------------------------------- --- Response: ---------------------------------------------------------------------------- --- HTTP/1.1 304 Not Modified Server: Resin/2.1.8 Date: Tue, 09 Mar 2004 19:13:51 GMT ---------------------------------------------------------------------------- --- Any ideas, what could be the problem here? Joern > -----Urspr�ngliche Nachricht----- > Von: J�rn Gebhardt [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 9. M�rz 2004 19:11 > An: Maven Users List > Betreff: AW: multiproject:artifact, SNAPSHOT dependencies and the > reposito ry > > > Hi Ben, > > I checked this out but didn't succeed. The clocks of my local > machine and > our server (Reisin 2.1.8) are more or less identical (the > Reisin is about > little bit ahead). On the Reisin there is a file > xyz-SNAPSHOT-1.0.jar from > 5th of March (i.e. 4 days old). Locally, I have a file that > is one day old, > but it gets overriden by the older one on our Web server. > I treid all kind of time combinations, but in all cases the > local file got > overriden. > > Unfortunately, I don't have any idea, what I can do to solve > this problem. > I'm using RC1, maybe something changed thereafter? > > Joern > > > > -----Urspr�ngliche Nachricht----- > > Von: Ben Walding [mailto:[EMAIL PROTECTED] > > Gesendet: Freitag, 5. M�rz 2004 02:40 > > An: Maven Users List > > Betreff: Re: multiproject:artifact, SNAPSHOT dependencies and the > > reposito ry > > > > > > I may have tracked this one down - it's all time related. > > > > 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 > > >> > > >>> the 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 > > >>> > > >> 02/03/2004 > > >> > > >>>> 08:09:36 AM: > > >>>> > > >>>> > > >>>> > > >>>>> Greetings -- > > >>>>> > > >>>>> Is there a best practices document describing maven's > role in a > > >>>>> > > >>>>> > > >>>> multiproject > > >>>> > > >>>> > > >>>>> environment? > > >>>>> > > >>>>> One of the problems I'm currently trying to tackle is this: > > >>>>> > > >>>>> - internal components have dependencies to SNAPSHOT > > >>>>> > > >>>>> > > >>>> versions of other > > >>>> > > >>>> > > >>>>> internal components. > > >>>>> - after each project is compiled, it's SNAPSHOT artifact is > > >>>>> > > >>>>> > > >>>> created and > > >>>> > > >>>> > > >>>>> '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] > > >
