Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-1645

mvn archetype:generate -DarchetypeCatalog (archetype-catalog.xml) failing with Not a valid artifact path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4-M1
    • 1.4-M3
    • None
    • None
    • RHEL6
    • Patch

    Description

      "mvn archetype:generate -DarchetypeCatalog=http://host:9999/repository/public/foo/maven_archetypes" will append the archetype-catalog.xml and it should fetch the list of archetypes. However, this is failing on Archiva where an exception is thrown with "java.lang.IllegalArgumentException: Not a valid artifact path in a Maven 2 repository, filename 'archetype-catalog.xml' doesn't start with artifact ID" since Archiva is treating this as an artifact.

      I think there needs to be a check for such case similar to metadata file for an archetype catalog so that it doesn't try to check for valid artifact format. I can create a ticket and submit a patch for this.
      Thanks.
      -Charlie

      Attachments

        1. ArchivaDavResourceFactory_patch.txt
          0.8 kB
          charles kim
        2. ArchivaDavResourceFactoryTest_patch.txt
          2 kB
          charles kim
        3. RepositoryRequest_patch.txt
          0.8 kB
          charles kim

        Activity

          People

            olamy Olivier Lamy
            charlesk40 charles kim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: