maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stevo Slavic (JIRA)" <>
Subject [jira] Updated: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog
Date Mon, 21 Dec 2009 08:43:55 GMT


Stevo Slavic updated ARCHETYPE-273:

    Attachment: org.apache.maven.archetype.maven-archetype-ARCHETYPE-273_&_220_combo.patch

Attaching proposed patch to archetype trunk r892601 ([^org.apache.maven.archetype.maven-archetype-ARCHETYPE-273_&_220_combo.patch])
with new ImportRemoteCatalogMojo (archetype:import-catalog goal, mandatory "repository" parameter
with no default value, and optional "repositoryId" parameter defaulting to "archetype" value).

When run import mojo will:
- load remote archetype catalog from %repository%/archetype-catalog.xml URL;
- load local archetype catalog from %localRepository%/archetype-catalog.xml;
- loop through archetypes listed in remote archetype catalog and for each check:
-- if remote archetype is not listed in local archetype catalog import mojo will download
archetype artifact into local repository and update local archetype catalog;
- and finally save local archetype catalog to %localRepository%/archetype-catalog.xml.

This patch also contains my patch for ARCHETYPE-220, adding support for archetypeRepositoryId
parameter to archetype:generate goal. Will look into separating the two if possible.

Existing tests pass. No new tests have been added yet.

> add goal to import remote archetype catalog into local catalog
> --------------------------------------------------------------
>                 Key: ARCHETYPE-273
>                 URL:
>             Project: Maven Archetype
>          Issue Type: New Feature
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>            Reporter: Dan Allen
>         Attachments: org.apache.maven.archetype.maven-archetype-ARCHETYPE-273_&_220_combo.patch
> If I've just published a new archetype, I need to be able to provide the developer with
a command that allows them to "educate" their local catalog about the new archetypes that
area available. Currently, it's possible to specify an archetype catalog for a single run
of the generate goal:
> mvn archetype:generate -DarchetypeCatalog=
> But the catalog is transient. Those entries are not "remembered". The next time I run
the generate goal...
> mvn archetype:generate
> ...the archetypes in the catalog provided in the previous command are not offered as
> This is especially problematic when using an IDE to create a new Maven project, because
the mechanism for providing an archetype catalog differs in each IDE. We want them to be in
the local repository. Simply point, it's too much information for the developer to have to
reconcile, especially since using an archetype is likely the developer's first exposure to
your project. It needs to be simple.
> What I'm looking for is a command that I can give the developer to import the entries
from a remote archetype catalog. A discovery mechanism so to speak.
> I envision the following sequence to work:
> mvn archetype:import -DarchetypeCatalog=
> mvn archetype:generate
> At this point, the developer would see options for the imported archetypes. The import
goal could even download the archetype JAR files at the same time. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message