archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daivish Shah <daivish.s...@gmail.com>
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.
C:\networkfolder\ErrorLogging\1.0\Java\ErrorLogClient.jar.

So i want to use this directory structure as Archiva Local Respository and
it should populate the Directory on HTTP url something like this
http://localhost:8080/archiva/browse/ErrorLogClient/ErrorLogClient/1.0/ErrorClient-1.0.jar

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


So you can read all the email details as below which i discussed with Brett
Porter <http://jira.codehaus.org/secure/ViewProfile.jspa?name=brettporter>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
questions.

Waiting for your reply.


Thanks,

Daivish.



http://jira.codehaus.org/browse/MRM-1482?focusedCommentId=274301

MRM-1482 <http://jira.codehaus.org/browse/MRM-1482>

Hi,

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 :

C:\networkfolder\ErrorLogging\1.0\Java\ErrorLogClient.jar

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

http://localhost:8080/archiva/browse/ErrorLogClient/ErrorLogClient/1.0/ErrorClient-1.0.jar

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.

Thanks,
Daivish.

Brett Porter<http://jira.codehaus.org/secure/ViewProfile.jspa?name=brettporter>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 <http://jira.codehaus.org/secure/ViewProfile.jspa?name=daivish>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...

http://localhost:8080/samplepath/networkrepository/ErrorLogClient/ErrorLogClient/1.0/ErrorClient-1.0.jar

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
repository.

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.

-Daivish.

Brett Porter<http://jira.codehaus.org/secure/ViewProfile.jspa?name=brettporter>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:

http://localhost:8080/archiva/repository/someid/ErrorLogClient/ErrorLogClient/1.0/ErrorLogClient-1.0.jar

and on the storage end you would look that up as a path
C:\networkfolder\ErrorLogging\1.0\Java\ErrorLogClient.jar

It is a copy of this class:
http://svn.apache.org/viewvc/archiva/branches/archiva-1.3.x/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java?revision=900340&view=markup





daivish shah <http://jira.codehaus.org/secure/ViewProfile.jspa?name=daivish>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 <http://jira.codehaus.org/secure/ViewProfile.jspa?name=daivish>added
a comment - 26/Jul/11
5:27 PM

Hi Brett,

Can you explain me little bit on this ?

Thanks,
daivish.

Brett Porter<http://jira.codehaus.org/secure/ViewProfile.jspa?name=brettporter>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 dev@archiva.apache.org and we'd be happy to help
incorporate your patch.

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

http://archiva.apache.org/developers/building.html

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

http://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x

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:

   -
   archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml
   -
   archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/repositoryForm.jspf

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
there.

If you have any questions, feel free to ping us on dev@archiva.apache.org.







*Thanks, *

*Daivish Shah*

*Software Dev Engineer III*

6220 Greenwich Drive,

San Diego, CA-92122

*858.368.7242* (W)

760-529-6062 (C)

*Email*: daivish.shah@Mitchell.com

[image: Description: Description: Description: Description:
http://spintranet/SiteCollectionImages/mitchell_logo_web_193x47.jpg]

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