RE: 504 in maven, works everywhere else
Hello all, I've now solved the problem by writing my own proxy. It's called DSMP (Dead Stu..Simple Maven Proxy) and can be used with the proxy setting in settings.xml. It has these features: - It automatically mirrors any Maven repository, not only those mentioned in some config/POM/whatever file. - It remembers error returns from respository servers, so update checks run really fast. In the next version, I'm thinking about pluggable status caching strategies. - You can redirect requests from one URL to another. So, for example, if Maven believes that the maven-compiler-plugin has to be downloaded from http://mysterious.com/, you can rewrite that URL in the proxy without having to touch either your local repository or the broken POM. Of you can direct all maven requests to your nearest proxy without having to change the maven configuration. This will even work if there are multiple URLs to access the same file on a server (for example, on maven.sateh.com, maven2 is a link to repository). - It allows to merge patches into the downloads. This way, you can add your own fixes to broken artefacts without changing maven, without having to enable SNAPSHOTs and without having to worry that all your developers use the same proxy/mirror/repository settings. Things I'm thinking about: - Forbid downloads (always return 404 for some site) - Lock down snapshots (always return no, there is no newer version) - Version migration. There should be a simple way to create a self-contained set of files which allow a new plugin/artefact version to run/compile. The idea is that one developer examines a new version, checks that it doesn't break the build, etc. and then tells the proxy Ok, now I want everyone to be able to see the new version or Nah, drop it. I was thinking if you might want to include this in Archiva. The proxy runs independent of any container, though. Since it can create an arbitrary amount of threads, starting it from tomcat or jetty might not be that smart. -- Aaron Digulla
RE: Antwort: RE: 504 in maven, works everywhere else
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 11:43 AM To: archiva-users@maven.apache.org Subject: Antwort: RE: 504 in maven, works everywhere else Hello Aaron you need to provide some information about what is in your settings.xml I have a couple of repositories. The relevant entry is: repository idsnapshot/id nameSnapshots and patched packages/name urlhttp://m2proxy:8080/archiva/repository/snapshot/url releasesenabledfalse/enabled/releases snapshotsenabledtrue/enabled/snapshots /repository every thing is fine for normal artefacts, but for plugins you have to also configure the pluginRepository, I think you have something like this... pluginRepository idplugin.snapshot/id nameSnapshots and patched packages/name urlhttp://m2proxy:8080/archiva/repository/snapshot/url releasesenabledfalse/enabled/releases snapshots enabledtrue/enabled updatePolicynever/updatePolicy /snapshots /pluginRepository as maven is looking at your server you can add updatePolicynever/updatePolicy snapshots enabledtrue/enabled updatePolicynever/updatePolicy /snapshots to get rid of this checking, I think... And I have this mirror: mirror idcentral/id mirrorOfcentral/mirrorOf nameCentral repository mirror/name urlhttp://maven.sateh.com/maven2/url /mirror in my case I use my archiva server as mirror and let archiva do the checking on proxied repositories... mirror idcentral.mirror/id mirrorOfcentral/mirrorOf nameCentral repository mirror/name urlhttp://m2proxy:8080/archiva/proxy//url /mirror this still does not realy help, with the failing download... sorry Daniel When I download directly, I don't need a password; I've configure guest in archiva as observer for repo snapshot. Regards, -- Aaron Digulla Mohni, Daniel [EMAIL PROTECTED] schrieb am 05.12.2006 11:33:34: Hello Aaron you need to provide some information about what is in your settings.xml sometimes it also helps to use mvn -U ... to update the dependencies regards Daniel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 11:19 AM To: archiva-users@maven.apache.org Subject: 504 in maven, works everywhere else Hello, All of a sudden, archiva doesn't like maven anymore (or the other way 'round): Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: http://m2proxy:8080/archiva/repository/snapshot/org/apache/maven/plugi ns/maven-deploy-plugin/2.3-SNAPSHOT/maven-metadata.xml at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1153) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:85) When I download the very same file in a browser or with wget, it works! Maven together with Archiva is starting to drive me nuts! Sometimes, something works, sometimes, it doesn't. I have three repositories with releases and maven says oh, I checked all of them but when I run maven with -X, I see it just checks the snapshot repository! The *snapshot* repository! For a RELEASE! What's wrong with this crap :- Regards, -- Aaron Digulla
504 in maven, works everywhere else
Hello, All of a sudden, archiva doesn't like maven anymore (or the other way 'round): Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: http://m2proxy:8080/archiva/repository/snapshot/org/apache/maven/plugi ns/maven-deploy-plugin/2.3-SNAPSHOT/maven-metadata.xml at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1153) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:85) When I download the very same file in a browser or with wget, it works! Maven together with Archiva is starting to drive me nuts! Sometimes, something works, sometimes, it doesn't. I have three repositories with releases and maven says oh, I checked all of them but when I run maven with -X, I see it just checks the snapshot repository! The *snapshot* repository! For a RELEASE! What's wrong with this crap :- Regards, -- Aaron Digulla
RE: 504 in maven, works everywhere else
Hello Aaron you need to provide some information about what is in your settings.xml sometimes it also helps to use mvn -U ... to update the dependencies regards Daniel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 11:19 AM To: archiva-users@maven.apache.org Subject: 504 in maven, works everywhere else Hello, All of a sudden, archiva doesn't like maven anymore (or the other way 'round): Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: http://m2proxy:8080/archiva/repository/snapshot/org/apache/maven/plugi ns/maven-deploy-plugin/2.3-SNAPSHOT/maven-metadata.xml at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1153) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:85) When I download the very same file in a browser or with wget, it works! Maven together with Archiva is starting to drive me nuts! Sometimes, something works, sometimes, it doesn't. I have three repositories with releases and maven says oh, I checked all of them but when I run maven with -X, I see it just checks the snapshot repository! The *snapshot* repository! For a RELEASE! What's wrong with this crap :- Regards, -- Aaron Digulla