Return-Path: X-Original-To: apmail-archiva-dev-archive@www.apache.org Delivered-To: apmail-archiva-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0297360E0 for ; Fri, 29 Jul 2011 03:23:56 +0000 (UTC) Received: (qmail 37564 invoked by uid 500); 29 Jul 2011 03:23:53 -0000 Delivered-To: apmail-archiva-dev-archive@archiva.apache.org Received: (qmail 37416 invoked by uid 500); 29 Jul 2011 03:23:41 -0000 Mailing-List: contact dev-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@archiva.apache.org Delivered-To: mailing list dev@archiva.apache.org Delivered-To: moderator for dev@archiva.apache.org Received: (qmail 80698 invoked by uid 99); 28 Jul 2011 16:47:57 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daivish.shah@gmail.com designates 74.125.82.46 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=8JXyeb6ncFdxDeEXSI1Sq80o4GuY1mAnlTXzzKv5uX4=; b=D1uA1CvAaolf8tqazHhZQEvnLkSgJSe8KjnTYVJ5/LgREfaZ8wO4adu2qBoMmTtYgB 9yUEfSHBDqgemYVPNvvpTedq26L5cEuw9nxzy3KbQ4lktik6qpDXD6r5YxJwg18uY4oK SuYEh/2uRGzNCSbo8yqYf7oGA+jhiicmDRu+E= MIME-Version: 1.0 Date: Thu, 28 Jul 2011 09:47:30 -0700 Message-ID: Subject: (MRM-1482) Existing Network Location Access for JAR files From: Daivish Shah To: dev@archiva.apache.org Content-Type: multipart/alternative; boundary=20cf30025aa0be705704a923eb47 --20cf30025aa0be705704a923eb47 Content-Type: text/plain; charset=ISO-8859-1 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 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 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 Porteradded 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... 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 Porteradded 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 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 ? Thanks, daivish. Brett Porteradded 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] --20cf30025aa0be705704a923eb47--