You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Nicolas De Loof <ni...@capgemini.com> on 2006/06/01 11:57:18 UTC

detect maven1 / maven2 from a custom proxy

Hello,

The existing projects in my compagny use maven1. New projects may start 
using maven2.
We use a private repository based on a maven-proxy and a directory for 
private/restricted libs.

I'd like to convert the private repo to maven2 structure and reconfigure 
the proxy to user repo1.maven.org as repo.

To allow maven1 projects to use this "converted" repo, I've created a 
simple servletFilter to translate maven1 requests to maven2 pattern 
(I've used the RewriteRule regexp used at ibilio for this).

Now I'd like to automagically detect which version of maven is used. 
 From my experiments, maven1 uses commons-httpclient and maven2 uses 
java native HTTP support :
using maven 1 user-agent = Jakarta Commons-HttpClient/2.0.2
using maven 2 user-agent = Java/1.4.2_06

Is there any safer way to detect maven version from the proxy point of 
view ?
Are there plan to make maven2 use commons-httpclient ?

Thanks.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org