[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2010-01-03 Thread luke w patterson (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=204969#action_204969
 ] 

luke w patterson commented on ARCHETYPE-273:


 Here is a new patch ... 
 New mojo has been renamed to ImportMojo ... 
 since it now supports importing not only all archetypes 
 but also importing just single fully specified archetype

Thanks Stevo, I applied the patch locally and tested it.

I only ran into one issue:

org.apache.maven.archetype.source.ArchetypeDataSourceException: Error parsing 
archetype catalog.
at 
org.apache.maven.archetype.source.CatalogArchetypeDataSource.readCatalog(CatalogArchetypeDataSource.java:202)
at 
org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.getArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:114)
at 
org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java:210)
at 
org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java:201)
at 
org.apache.maven.archetype.mojos.ImportMojo.execute(ImportMojo.java:153)

You'll get that error if the remote repo's archetype-catalog.xml file is 
missing or empty.  At first I thought it was just an ordering issue in 
ImportMojo.execute, where the single import stuff should be done first, but as 
I dig deeper it looks like there are some more checks around the archetype 
entry's existence in archetype-catalog.xml.

 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-220__273_interactive_combo.patch,
  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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-22 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203783#action_203783
 ] 

Stevo Slavic commented on ARCHETYPE-273:


@Luke IMO such functionality should be part of archetype:generate mojo, because 
I doubt one would like to have archetype just to be resolved/installed in local 
repository and added in local archetype catalog without intention to use 
archetype in the first place.

Once remote archetype is specified archetype:generate resolves it and if all OK 
archetype is downloaded and present in local repository, just isn't yet usable 
(in next archetype:generate call) from local repository because it's not listed 
in local archetype catalog. Configurable parameter (e.g. importArchetype) could 
tell archetype:generate whether, besides using archetype for generating 
project, archetype:generate should also add archetype to local archetype 
catalog.

It makes little sense to me, to download remote archetype in local repository 
but not have it automatically listed in local archetype catalog, so this 
importArchetype could by default be set to true (although this would somewhat 
break compatibility in default behavior with previous version). If 
importArchetype is set to true, archetype:generate should do the importing 
archetype in local catalog only after successful generation of project using 
given archetype, and before user specified additional goals.

If not already archetype:generate could be made smart, when in interactive mode 
and listing archetypes, it should make sure that for each archetype no more 
than one option for same archetype version gets listed; if it makes any 
difference, archetype:generate should consistently prefer local to remote copy 
of same archetype version.

Nevertheless, IMO a separate issue should be created for this.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-22 Thread Dan Allen (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203858#action_203858
 ] 

Dan Allen commented on ARCHETYPE-273:
-

Stevo, I'm not sure you are disagreeing with me, but I do want to respond to 
this statement:

I doubt one would like to have archetype just to be resolved/installed in 
local repository and added in local archetype catalog without intention to use 
archetype in the first place.

Actually, that's kind of the idea. I want to be able to tell users how to 
import all my archetypes so that, down the road (maybe a day, week, month) they 
can see the archetypes available in their IDE (because they are local). We 
might already be on the same page, I just wanted to clarify.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-22 Thread luke w patterson (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203860#action_203860
 ] 

luke w patterson commented on ARCHETYPE-273:


 Stevo said:
 [regarding individual archetype imports]
 Nevertheless, IMO a separate issue should be created for this.

agreed, I created: 

add goal to import archetype into local catalog ARCHETYPE-277
add property to generate goal which imports archetype into local catalog 
ARCHETYPE-278


 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-22 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-22 Thread luke w patterson (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203867#action_203867
 ] 

luke w patterson commented on ARCHETYPE-273:


 while if I understood Luke well he'd like support for importing single 
 archetype

Yes I want to be able to publish individual archetypes without necessarily 
updating/managing/publishing a catalog file.  I would want a Maven CLI command 
which can import my archetype into the local catalog so they can use it later 
(through CLI or m2eclipse).

I guess if your patch is applied I could just attach (using 
build-helper-maven-plugin) a catalog file to each of my archetypes, and have 
them import that catalog.  That is if it doesn't have to be named a specific 
name (archetype-catalog.xml).

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread Dan Allen (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203709#action_203709
 ] 

Dan Allen commented on ARCHETYPE-273:
-

Overall, I think you have suggested a nice solution. However, I think the 
repository parameter should be named catalog. That's consistent with the 
archetype:generate command.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203713#action_203713
 ] 

Stevo Slavic commented on ARCHETYPE-273:


repository parameter is inline with archetype:generate's archetypeRepository 
parameter; in both cases it is any repository URL, which is used by mojos to 
construct repository (usually with default repositoryId, and if explicitly 
provided with given repository id which is handy for authentication) for 
retrieving repository archetype catalog and artifacts. In archetype:generate 
catalog can be local, remote, internal, http:// or file://, neither of which is 
flexible, powerful, nor simple as just any repository URL requirement (so 
including https://, maybe even dav:// will work, as long as there is 
appropriate wagon provider available).

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread Dan Allen (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203721#action_203721
 ] 

Dan Allen commented on ARCHETYPE-273:
-

Ah, in that case, it does make sense. I didn't know what the 
archetypeRepository parameter was for since there is absolutely no 
documentation for it on this page: 
http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html#archetypeRepository

Also, I meant to say archetypeCatalog where I said catalog. For 
consistency, perhaps both archetypeRepository and archetypeCatalog should be 
supported. Or are you saying that archetypeCatalog should be deprecated? That's 
fine with me as long as the preferred parameter is supported by both goals.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203726#action_203726
 ] 

Stevo Slavic commented on ARCHETYPE-273:


archetypeRepository (repository) and archetypeCatalog (catalog) are somewhat 
overlapping. Yes, docs are scarce, even in the [Maven 
book|http://www.sonatype.com/books/maven-book]. Luckily it's FOSS.

I agree that either both parameters should be supported or just one, 
consistently. As proof of concept in my import-catalog mojo patch I implemented 
support just for one (repository). If there's no special reason to support both 
I'd prefer if it was just one that is left, maybe even just 
archetypeCatalog/catalog, it would make things more clear. Of course decision 
is up to plugin maintainers.

IMO, in any case, repositoryId should be supported - repository URL (in form of 
repository or catalog) and repositoryId should go as a pair, just like in 
deploy:deploy-file mojo.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread luke w patterson (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203731#action_203731
 ] 

luke w patterson commented on ARCHETYPE-273:


Dan,

I was looking over your patch to see if it could be augmented to include what I 
consider to be a necessary goal: import-archetype

import-archetype would simply import one archetype from a repo (local or 
remote) into the local catalog

Does your patch provide any foundation code for for an import-archetype goal? 
 I'll keep reading through it.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-21 Thread Dan Allen (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203743#action_203743
 ] 

Dan Allen commented on ARCHETYPE-273:
-

Luke, the patch was created by Stevo Slavic.

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-20 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203560#action_203560
 ] 

Stevo Slavic commented on ARCHETYPE-273:


Until this is implemented, one can issue mvn archetype:generate 
-DarchetypeCatalog=http://example.com/maven2 -Dgoals=archetype:crawl so at 
least used archetype will become available in local archetype catalog.

 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

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-20 Thread Dan Allen (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203584#action_203584
 ] 

Dan Allen commented on ARCHETYPE-273:
-

That's not even really a workaround. The user still has to run the command once 
for each archetype in the catalog, selecting each archetype in turn, and 
aborting immediately after making the selection. Once they do all that, then 
they can see the archetypes appears in the local catalog (without using the 
-DarchetypeCatalog flag).

Again, the reason this is important is because the developer should be able to 
run a single command, get the import over with, then be able to select those 
new archetypes no matter where they run archetype:generate, whether it be from 
the commandline or an IDE. I don't want to have to then show them how to setup 
an archetype catalog in an IDE because every IDE does it differently. I've lost 
the developer's interest at that point. 

 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

 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




[jira] Commented: (ARCHETYPE-273) add goal to import remote archetype catalog into local catalog

2009-12-20 Thread Stevo Slavic (JIRA)

[ 
http://jira.codehaus.org/browse/ARCHETYPE-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=203592#action_203592
 ] 

Stevo Slavic commented on ARCHETYPE-273:


IMO it would be wise to support specifying archetypeRepositoryId parameter for 
this new archetype:import mojo, like I suggested in ARCHETYPE-220 for 
archetype:generate, so that archetypes listed in catalogs on repositories which 
require authentication can be imported as well.

 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

 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