This could be the issue since you are using Resin and it's last modified behaviour appears to be different to Apache. I'd check into Resin's documented behaviour. I was only testing against ibiblio and whatever server that uses
Also, you should probably remove the trailing slash on your remote repo spec.
I.e.
maven.repo.remote=http://yourserver:8080/maven (typically good) vs. maven.repo.remote=http://yourserver:8080/maven/ (typically bad)
Cheers,
Ben J�rn Gebhardt wrote:
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
header. The-----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
rules for this header state (from the http1.1 spec)server's current
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
time is invalid."protocol to only
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 certainlynot limited to
ibiblio only.web server.
I have the same exact bug when I am working with intranet
I don't know if this is problem of maven it self, webserver caching,
SNAPSHOTs.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
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
dependencies and thedownload 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 SNAPSHOTis newer.
Maven seems to always download it -- even if they areidentical. Anyone
have a definitive answer for this? I'm using 1.0-rc1.should say, I'd
Using the "-o" option isn't sufficient enough. I'd like to avoid
downloading SNAPSHOT jars of my internal projects (or, I
like to avoid overwriting the newer SNAPSHOT jar that existsin my local
repository) but, at the same time, I need to have access toeverything 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
your localSHNAPSHOTreposito rydescribed. I
Hi,
That's strange. We have exactly the same problem that Adrian
believe that Maven doesn't check any dates when resolving
dependencies, but just downloads the SNAPSHOT jar from theremote repository
if it is there.to used the -o
I've posted a similar message some weeks ago and was advised
(offline) option of Maven (e.g. maven -o jar) to suppressthe download from
the remote server. Alternatively, you can set a property (Idon't remember
the property name, but it's documented somewhere...) in
dependencies and thebuild.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
role in a02/03/2004repository
"Kalaveshi, Adrian" <[EMAIL PROTECTED]> wrote on
08:09:36 AM:
Greetings --
Is there a best practices document describing maven's
projects)multiproject
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
---------------------------------------------------------------------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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
