archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daivish Shah <>
Subject (MRM-1482) Existing Network Location Access for JAR files
Date Thu, 28 Jul 2011 16:47:30 GMT
Hi Users Group,

 I have a Issue which i want to incorporate with Archiva, I need to write
custom Archiva code to support follow directory structure.

So i want to use this directory structure as Archiva Local Respository and
it should populate the Directory on HTTP url something like this

And i want this HTTP url like this because MAVEN supports this directory

So you can read all the email details as below which i discussed with Brett
Porter <>and
he suggested me to send email to you guys.

Please help me out to support this feature, Let me know if you guys have any

Waiting for your reply.



MRM-1482 <>


I have one quick Question for you guys.

I am having one issue to adopt Archiva and Maven. My company needs following
features available with Archiva. I am trying to force my company to choose
Archiva but they have one critical question for you guys.

My company is looking for a tool, Which can provide existing network path
location as Maven Local Repository. Example is as followed.

Existing network Path :


And my MAVEN repository should show-up path something like this.


Is there any work around for this, That Archiva can provide me ?

The company has more then 100 products which is using something like this so
we have to start with only 1 project for now. And for that there are so many
dependency with each projects so we can't create a new network location and
where we point as a MAVEN repository so i am looking for something which can
provide me to use existing network path which actually has different kind of
directory structure which is archiva is expecting at this moment.

Can you please reply me as soon as possible. AS i need to figure it out can
i choose Archiva for this or not ?

Let me know if you are confused or not clear with my requirement.


Brett Porter<>added
a comment - 24/Jul/11
9:14 PM

You would have to write a small amount of custom code into Archiva, but it
isn't exposed as a user level feature. Essentially this is the same
abstraction that is used to support Maven 1.x and Maven 2.x format
repositories simultaneously. Is that something you are prepared to do?

Alternatively, you could quite easily script something to upload that
directory into Archiva with default POMs, but then you have two copies and
you probably only want to maintain one going forward.

There is a catch to keep in mind here though - default POMs will not have
any dependency information, so the amount of dependency management you can
do with these JARs will be limited. You may want to invest the right amount
effort to get this populated as well to improve your use of Maven.

daivish shah <>added
a comment - 25/Jul/11
11:51 AM

I think from your answer it looks like i have to write a custom code which
brings me URL something like this...


And i have to USE this URL as my network-repository only, And then no point
of Using Archiva at this moment unless i upload all artifacts into Archiva

I was trying to avoid writing new custom code. As archiva is nice tool and
very good features available itself. But my company is not looking to change
existing network location or structure for all JARs at this moment. So i
have only one option left to write custom code to create HTTP URL.

Thanks for your help.


Brett Porter<>added
a comment - 25/Jul/11
6:33 PM

Actually, what I meant was to write custom code within Archiva, so that
Maven would request:


and on the storage end you would look that up as a path

It is a copy of this class:

daivish shah <>added
a comment - 25/Jul/11
6:52 PM

I think you are right.

Can you explain me, What exactly all things i need to do with this file and
What all steps that i need to follow to complete this ?

This is really good idea if i can do with Archiva only, I am very happy to
hear this... Please explain me more in detail.

Thanks Brett !!! Looking forward to hear more from you.

daivish shah <>added
a comment - 26/Jul/11
5:27 PM

Hi Brett,

Can you explain me little bit on this ?


Brett Porter<>added
a comment - 26/Jul/11
8:01 PM

Here are the steps to just support a custom managed repository type,
building on Archiva 1.3.x. If you wanted to make the modification to trunk
(which has changed but is not released yet) or make it flexible, please
discuss it with us on and we'd be happy to help
incorporate your patch.

The first step is to make sure you can checkout and build Archiva:

Instead of the location there, you will want to check out the branch for
your purposes:

Once you can build and run it, try copying the class above to a new one in
the same directory and change the "legacy" references to, say, "custom". As
part of changing this, you'll also need alternatives for these:

   - AbstractLegacyRepositoryContent
   - LegacyPathParser

You'll also need to add "custom" as valid values in these:


If you can then build and run archiva and create a managed repository of
type "custom", you are ready to edit the code you copied to read files in
the format you expect. Hopefully, how to do that is obvious from the code

If you have any questions, feel free to ping us on

*Thanks, *

*Daivish Shah*

*Software Dev Engineer III*

6220 Greenwich Drive,

San Diego, CA-92122

*858.368.7242* (W)

760-529-6062 (C)


[image: Description: Description: Description: Description:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message