archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter" <brett.por...@gmail.com>
Subject Fwd: Maven2 Repository "Faker" WebApp Committed
Date Wed, 15 Aug 2007 13:59:38 GMT
Thought some folks here might find this interesting.

---------- Forwarded message ----------
From: Stefan Bodewig <bodewig@apache.org>
Date: 15-Aug-2007 23:54
Subject: Maven2 Repository "Faker" WebApp Committed
To: general@gump.apache.org


Hi all,

I've just committed what might be the seed for getting mvn under Gump
do what we want it to do.

Inside http(s)://svn.apache.org/repos/asf/gump/mvnrepo/trunk you'll find
a very small Restlet (<http://www.restlet.org/>) based web application
that can do the following:

* if asked for /maven2/{groupId}/{artifactId}/{version}/{something}.jar
  and the webapps has a local file registered, for the given groupId
  and artifactId => serve the local file

* proxy any other request that comes in to http://repo1.maven.org/ (cool,
  eh?)

So if you start it, it will be a transparent proxy for
<http://repo1.maven.org/>, but if you add local file names for a given
combination of groupId and artfactId (by using the extremely slick
/addartifact.html page) it will serve those files instead.

The idea is to start it and add all known JARs we are going to create.
Then we'd have to configure mvn to use our local web-app and any
artifact retrieved from the repo that is built by Gump will be ours.

The application completely ignores the requested version, of course.

I haven't really given it a full spin and I think we'll have to
intercept .md5 downloads as well (at least I hope mvn would render
artifacts illegal if they didn't match the checksums) but wanted to
open up development ASAP.

We'll have to clean out the local mvn repo after each run as well.

I've chosen Restlet since I am a Java weeny[1][2] and I knew that
Restlet would give me two key features for free: URI templates and
proxying requests.  If you look at the webapp, it is a whopping six
classes, one of which is just setting up the application, one is a
very thin (and probably unnecessary) layer on top of Restlet's
Redirector and one serves out static HTML.

Let me know what you think

    Stefan

Footnotes:
[1]  who'd love to do more Lisp

[2]  who gets paid for being a C# weeny


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org



-- 
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/

Mime
View raw message