archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas De Loof <nicolas.del...@capgemini.com>
Subject Re: using archiva as a maven1 repo proxy...
Date Thu, 24 Aug 2006 07:48:12 GMT

I've created http://jira.codehaus.org/browse/MRM-153 for this and 
attached a patch.

This patch works to download :
"/servletapi/jars/servletapi-2.4.jar"
  --> "/servletapi/servletapi/2.4/servletapi-2.4.jar"
    --> "/servletapi/servletapi/2.4/servletapi-2.4.pom"
        [relocation] --> 
"/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"

Code may require some rewriting as I'm newbee with Maven2 APIs...

Please notice if you thy this sample that servletapi-2.4.pom has a buggy 
checksum file on ibilio.


I also noticed this :
When Archiva downloads a maven1 artifact, (let's say servletapi-2.3 if 
relocation isn't used) the checksum is stored in repo using a maven2 
path, but the artifact is stored using original maven1 path. This may 
produce lot's of duplicates in the managed repo.

 -> servletapi\servletapi\2.3\servletapi-2.3.jar.sha1
 -> servletapi\jars\servletapi-2.3.jar

When a maven2 client asks for it, the artifact is downloaded a second time
 -> servletapi\servletapi\2.3\servletapi-2.3.jar

I'll investigate this...


Nico.
>> question 2. may be more difficult...
>
> Somewhat, but I think it's entirely possible. This is what Archiva is 
> designed for.
>
>>
>> Nicolas De Loof a écrit :
>>>
>>> Two questions about archiva support for maven1 repository requests :
>>>
>>> 1. How does archiva extracts artifactId / version from maven1 request ?
>>> I have created a quick & dirty converter for my repo and wanted to 
>>> use the ibilio regexp to convert, but I got issues for artifact 
>>> which artifact ID has multiple parts separated by "-". I solved it 
>>> by not useing regexp but parsing the name for "-" and searchnig the 
>>> first element starting with a digit char, but it fails for 
>>> "groovy-1.0-jsr-06.jar" (version found is "1.0-jsr-06")
>>>
>>> 2. Could archiva support relocation for maven1 request ?
>>> As maven1 has no relocation mecanism, it would be great to avoid 
>>> muliple artifacts for same jar (let's say servletapi...) and use 
>>> maven2 relocation to automagically convert 
>>> "/servletapi/jars/servletapi-2.5.jar" to 
>>> "/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar". This requires 
>>> archiva proxy to be not a simple proxy, but also a maven2 agent and 
>>> search for POM when looking for an artifact...
>>>
>>>
>>>
>>> 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.
>>>
>>
>> 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.
>

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.


Mime
View raw message