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 Sun, 03 Jan 2010 03:24:55 GMT


Stevo Slavic updated ARCHETYPE-273:

    Attachment: org.apache.maven.archetype.maven-archetype-ARCHETYPE-220_&_273_interactive_combo.patch

Here is a new patch [^org.apache.maven.archetype.maven-archetype-ARCHETYPE-220_&_273_interactive_combo.patch].
New mojo has been renamed to ImportMojo, and it's goal has been renamed too from "import-catalog"
to just "import" since it now supports importing not only all archetypes but also importing
just single fully specified archetype from given remote archetype repository, in both interactive
and non-interactive mode.

E.g. to import all weld archetypes one can issue:

mvn archetype:import \
-Drepository= \

or to have just weld-jsf-jee imported:

mvn archetype:import \
-Drepository= \
-Dsettings.interactiveMode=false -DarchetypeArtifactId=weld-jsf-jee \
-DarchetypeGroupId=org.jboss.weld.archetypes \

(note: "\" and line breaks are only included for "pretty printing", and should not be present
in actual command)

When importing archetypes from a repository in (default) interactive mode, archetype selector
will offer user to chose from archetypes found in remote archetype catalog, appended at the
start of the archetype list with "all" option which if chosen (option 1) will result in having
all remote catalog archetypes imported in local archetype catalog and repository.

repositoryId is present and optional for repositories which require authentication.

Notice that in this comment examples
is not path to maven 2 repository, but it points archetype plugin to archetype-catalog.xml
file, while archetype artifacts will actually get resolved from maven central repository as
neither (initially) local nor that remote repository URL do not contain archetype artifacts,
while central does.

Patch doesn't add new tests, existing ones pass. Will try to add some integration tests later
in a separate patch.

Note that because of bug in maven 2 (fixed in maven 3 alphas) and jetty 6 (fixed in jetty
7) existing tests (even without patch) will not pass if project build path contains spaces.

> 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-220_&_273_interactive_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