Archiva
  1. Archiva
  2. MRM-1482

Exsiting Network Location Access for JAR files

    Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.3.5
    • Fix Version/s: Backlog
    • Component/s: repository scanning
    • Labels:
      None
    • Environment:
      Windows
    • Number of attachments :
      0

      Description

      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.

        Activity

        Hide
        Brett Porter added a comment -

        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.

        Show
        Brett Porter added a comment - 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.
        Hide
        daivish shah added a comment -

        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.

        Show
        daivish shah added a comment - 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.
        Hide
        Brett Porter added a comment -

        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

        Show
        Brett Porter added a comment - 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
        Hide
        daivish shah added a comment -

        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.

        Show
        daivish shah added a comment - 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.
        Hide
        daivish shah added a comment -

        Hi Brett,

        Can you explain me little bit on this ?

        Thanks,
        daivish.

        Show
        daivish shah added a comment - Hi Brett, Can you explain me little bit on this ? Thanks, daivish.
        Hide
        Brett Porter added a comment -

        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.

        Show
        Brett Porter added a comment - 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.
        Hide
        daivish shah added a comment -

        Thanks Brett for your help. I sent email to dev@archiva.apache.org group waiting for reply from them now.

        I hope it should not take much effort to do this. What do you think is it require lot of work around ?

        Show
        daivish shah added a comment - Thanks Brett for your help. I sent email to dev@archiva.apache.org group waiting for reply from them now. I hope it should not take much effort to do this. What do you think is it require lot of work around ?
        Hide
        Brett Porter added a comment -

        how are you going with this?

        Show
        Brett Porter added a comment - how are you going with this?
        Brett Porter made changes -
        Field Original Value New Value
        Fix Version/s Backlog [ 13571 ]
        Hide
        daivish shah added a comment -

        Hi Brett,

        I didn't get any reply from (dev@archiva.apache.org) So i developed my own Archiva which doesn't have same kind of functionality But atleast i can download JAR files with POM XML from my own project URL.

        something like this So you hit the URL and it gives me POM and JAR file which MAVEN is looking for.

        http://localhost:8080/myproject/repository/ErrorLogClient/ErrorLogClient/1.0/ErrorLogClient-1.0.jar

        So currently i am using my own project which i developed and which is using Archiva concepts.

        Thanks for asking Brett, I can't wait such a long so i thought let me develop myself only.

        Show
        daivish shah added a comment - Hi Brett, I didn't get any reply from (dev@archiva.apache.org) So i developed my own Archiva which doesn't have same kind of functionality But atleast i can download JAR files with POM XML from my own project URL. something like this So you hit the URL and it gives me POM and JAR file which MAVEN is looking for. http://localhost:8080/myproject/repository/ErrorLogClient/ErrorLogClient/1.0/ErrorLogClient-1.0.jar So currently i am using my own project which i developed and which is using Archiva concepts. Thanks for asking Brett, I can't wait such a long so i thought let me develop myself only.
        Show
        Brett Porter added a comment - No problem. You may want to check your email settings though, as you did get responses: http://mail-archives.apache.org/mod_mbox/archiva-dev/201107.mbox/%3C202ACA4A-6B53-4701-8C48-D267DBA9E927@apache.org%3E http://mail-archives.apache.org/mod_mbox/archiva-dev/201107.mbox/%3CCAPCVKoLxj_vQNBMuNoVg3Os4Ce7xa0OirJZBE6Y-_U=hGzsVMw@mail.gmail.com%3E
        Hide
        daivish shah added a comment -

        Hi Brett,

        Yes i didn't get this email in my inbox sorry about that.

        i think i am fine at this moment as i already made my own repository code, If i will find any issue in future i will contact you again.

        Thanks for all your help.

        Show
        daivish shah added a comment - Hi Brett, Yes i didn't get this email in my inbox sorry about that. i think i am fine at this moment as i already made my own repository code, If i will find any issue in future i will contact you again. Thanks for all your help.

          People

          • Assignee:
            Unassigned
            Reporter:
            daivish shah
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: