[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=203864#action_203864
 ] 

Stevo Slavic commented on ARCHETYPE-273:
----------------------------------------

Dan, I understood that you want support for importing _all_ archetypes, while 
if I understood Luke well he'd like support for importing _single_ archetype. 
My initial thought was that importing single archetype would best suite 
archetype:generate goal, and I still think it would be at least handy if one 
could suggest generate goal, not just to download, and use, but also to enlist 
downloaded archetype in local catalog.

Nevertheless, importing archetypes could also be implemented with bit of 
interactivity, similar to what is already supported in archetype:generate, so 
behavior could be following:
- if in interactive mode
-- if just repository is given, import archetype mojo could retrieve remote 
catalog, list all the entries in remote archetype catalog as options + option 
"import all" so user can choose whether to import just specific archetype or to 
have them all imported
- if in non-interactive mode
-- if just repository is specified all archetypes get imported
- regardless of being in interactive mode or not
-- if user specifies archetype (groupId, artifactId, version) and remote 
repository, just that archetype gets imported

Parameter interactiveMode, like 
[one|http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html#interactiveMode]
 in archetype:generate, would signal the mode we're in.

> add goal to import remote archetype catalog into local catalog
> --------------------------------------------------------------
>
>                 Key: ARCHETYPE-273
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-273
>             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=http://example.com/maven2
> 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 options.
> 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=http://example.com/maven2
> 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: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to