Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-242

The "remote" archchetype-catalog doesn't really exist.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      This page http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-catalog.html states that the default "remote" catalog is located at http://repo1.maven.org/maven2/archetype-catalog.xml. However, there is no such file on repo1.maven.org and thus the remote catalog is useless.

        Activity

        Hide
        TamŠs CservenŠk added a comment -

        Not quite true. Central is meant only as "convenience" artifact source, nobody should use it directly anyway. All Maven users should use some sort of MRM (Maven Repository Manager, http://maven.apache.org/repository-management.html)

        For example, using Nexus OSS or Pro (http://nexus.sonatype.org/) together with Nexus Archetype Plugin (https://docs.sonatype.org/display/Nexus/Nexus+Archetype+Plugin) gives you exactly that: "live" archetype catalogs. When you deploy an archetype, it immediately gets listed in catalog, and is available to all other consumers of the repository.

        Show
        TamŠs CservenŠk added a comment - Not quite true. Central is meant only as "convenience" artifact source, nobody should use it directly anyway. All Maven users should use some sort of MRM (Maven Repository Manager, http://maven.apache.org/repository-management.html ) For example, using Nexus OSS or Pro ( http://nexus.sonatype.org/ ) together with Nexus Archetype Plugin ( https://docs.sonatype.org/display/Nexus/Nexus+Archetype+Plugin ) gives you exactly that: "live" archetype catalogs. When you deploy an archetype, it immediately gets listed in catalog, and is available to all other consumers of the repository.
        Hide
        JŲrg Henne added a comment -

        Ok, so i take back the "useless". However, the documentation is still wrong and highly confusing.

        Show
        JŲrg Henne added a comment - Ok, so i take back the "useless". However, the documentation is still wrong and highly confusing.
        Hide
        Stevo Slavic added a comment -

        Nexus Archetype Plugin will maintain archetype-catalog.xml for a given repository, once archetype artifact is deployed to that repository. If Nexus managed repository is a proxy/mirror of central, it will cache artifacts from central, but only ones that were used through mirror of central. Using latest archetype trunk (2.0-alpha-5-SNAPSHOT), archetype artifact can not be used without being first in an archetype catalog. So, remote (central) and all archetypes in central repository (except ones listed in archetype plugin internal archetype catalog) are useless unless archetype-catalog.xml is generated and maintained in central repository.

        Show
        Stevo Slavic added a comment - Nexus Archetype Plugin will maintain archetype-catalog.xml for a given repository, once archetype artifact is deployed to that repository. If Nexus managed repository is a proxy/mirror of central, it will cache artifacts from central, but only ones that were used through mirror of central. Using latest archetype trunk (2.0-alpha-5-SNAPSHOT), archetype artifact can not be used without being first in an archetype catalog. So, remote (central) and all archetypes in central repository (except ones listed in archetype plugin internal archetype catalog) are useless unless archetype-catalog.xml is generated and maintained in central repository.
        Hide
        Kalle Korhonen added a comment -

        Agree with Stevo, it's still pretty badly broken. MRM doesn't help much if you want to make your archetype available publicly to other users like many open source projects do. There was a discussion about this on Maven users list (http://markmail.org/message/remgjzpl2kdrd7ph?q=+Error+reading+archetype+catalog+http://repo1.maven.org/maven2&page=1&refer=2cb3yjsdlzym52vb) almost a year ago noting that repo1/repo2 should either just run archetype:crawl periodically or Sonatype's Nexus should push the catalog to repo1 but I don't know if either effort has gone anywhere. Considering archetype:create is already deprecated I think this is more than a minor issue. Right now, is there any better workaround than lobby archetype maintainers to include your archetype in the new version of archetype plugin?

        Show
        Kalle Korhonen added a comment - Agree with Stevo, it's still pretty badly broken. MRM doesn't help much if you want to make your archetype available publicly to other users like many open source projects do. There was a discussion about this on Maven users list ( http://markmail.org/message/remgjzpl2kdrd7ph?q=+Error+reading+archetype+catalog+http://repo1.maven.org/maven2&page=1&refer=2cb3yjsdlzym52vb ) almost a year ago noting that repo1/repo2 should either just run archetype:crawl periodically or Sonatype's Nexus should push the catalog to repo1 but I don't know if either effort has gone anywhere. Considering archetype:create is already deprecated I think this is more than a minor issue. Right now, is there any better workaround than lobby archetype maintainers to include your archetype in the new version of archetype plugin?
        Hide
        Stevo Slavic added a comment -

        Just submitted a patch for ARCHETYPE-273 which adds support for importing remote archetypes in local archetype catalog and repository; with that it would be possible to consume archetypes whose artifacts have (optionally) been deployed to central repo, with archetypes being listed in remote (not necessarily central repo) archetype catalog.

        Show
        Stevo Slavic added a comment - Just submitted a patch for ARCHETYPE-273 which adds support for importing remote archetypes in local archetype catalog and repository; with that it would be possible to consume archetypes whose artifacts have (optionally) been deployed to central repo, with archetypes being listed in remote (not necessarily central repo) archetype catalog.
        Hide
        RaphaŽl Piťroni added a comment -

        Hello Kalle,
        More than lobbying the maintainers, consider enhancing the archetype list wiki page http://docs.codehaus.org/display/MAVENUSER/Archetypes+List.
        I tell you that because the undocumented release process of the archetype plugin use that page to automatically create the internal catalog.

        Regards,

        RaphaŽl

        Show
        RaphaŽl Piťroni added a comment - Hello Kalle, More than lobbying the maintainers, consider enhancing the archetype list wiki page http://docs.codehaus.org/display/MAVENUSER/Archetypes+List . I tell you that because the undocumented release process of the archetype plugin use that page to automatically create the internal catalog. Regards, RaphaŽl
        Hide
        Kalle Korhonen added a comment -

        Brilliant RaphaŽl, thanks for the tip!

        Show
        Kalle Korhonen added a comment - Brilliant RaphaŽl, thanks for the tip!
        Hide
        Juven Xu added a comment -

        I just fixed the archetype catalog of maven central: http://repo2.maven.org/maven2/archetype-catalog.xml

        Show
        Juven Xu added a comment - I just fixed the archetype catalog of maven central: http://repo2.maven.org/maven2/archetype-catalog.xml

          People

          • Assignee:
            Juven Xu
            Reporter:
            JŲrg Henne
          • Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: