Hello Joseph,

Archetype list is picked up from the archetype catalog [1]. This is 
controlled by the parameter 'archetypeCatalog' when you invoke the goal 
'archetype:generate' (defaults to 'internal,local') [2].

Thus, what you see by default is the internal list that is picked up 
from archetype-catalog.xml that is bundled internally. That catalog is 
an old one.

The only way to have archetype:generate pick up new catalog is to 
specify one via -DarchetypeCatalog. For example, "mvn archetype:generate 
-DarchetypeCatalog=http://scala-tools.org/"; should show you the new list.

That said, we don't have the new catalog of archetypes deployed on 
http://scala-tools.org/archetype-catalog.xml. Please raise a ticket for 
this.

Till then, the longer version of archetype:generate (with 
'-DarchetypeRepository=... -DremoteRepositories=...' etc.) works best.

[1] 
http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-catalog.html
[2] 
http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html#archetypeCatalog

Cheers, Indrajit


On 28/12/09 1:35 AM, joseph hirn wrote:
> Hello Indrajitr,
>
> When using archetype:generate without the command line args, why does
> it not build the latest release of the archetype? I saw that 1.1-M8 is
> in central but the version it builds uses lift-core 0.8.
>
> I'm not 100% on how it chooses the archetype version from the normal
> selection menu but it would be nice to get something relatively more
> up to date.
>
> Sorry if this is discussed elsewhere.
>
>
> On Dec 1, 8:28 am, Indrajit Raychaudhuri<[email protected]>  wrote:
>> Friends,
>>
>> Following the recent refactoring that the Lift archetypes went though,
>> we have moved forward to the newarchetypemetadata format [1] for all
>> the archetypes.
>>
>> So far, the JPA related archetypes were using the new metadata format
>> while the others (esp. lift-archetype-blank and lift-archetype-basic)
>> were still on the old format. Moving to the new metadata format helps
>> us keep things consistent, comply with Maven's recommendation and open
>> the archetypes up for additional future enhancements.
>>
>>  From now on, the recommended Maven goal togenerateprojects fromarchetypeis 
>> to use "archetype:generate" [2]. The currently deprecated
>> Maven goal "archetype:create" [3] would not work to give expected
>> result and thus is not recommended anymore.
>>
>> Therefore, togenerateproject from the archetypes in the master you
>> would use a command of the form:
>>
>> mvnarchetype:generate\
>>    -DarchetypeRepository=http://scala-tools.org/repo-snapshots\
>>    -DremoteRepositories=http://scala-tools.org/repo-snapshots\
>>    -DarchetypeGroupId=net.liftweb \
>>    -DarchetypeArtifactId=lift-archetype-blank \
>>    -DarchetypeVersion=1.1-SNAPSHOT \
>>    -DgroupId=com.mypackage \
>>    -DartifactId=myproject \
>>    -Dversion=1.0-SNAPSHOT
>>
>> Currently, the possible archetypeArtifactId are:
>>    - lift-archetype-blank
>>    - lift-archetype-basic
>>    - lift-archetype-jpa-blank-single
>>    - lift-archetype-jpa-blank
>>    - lift-archetype-jpa-basic
>>
>> If you create project interactively (default behavior), -DgroupId, -
>> DartifactId, -Dversion are optional. Maven would prompt for these
>> values (and some more) interactively.
>>
>> On the other hand, if you are using a batch/shell script togenerate
>> project non-interactively, you would need to add at least -DgroupId, -
>> DartifactId and additionally set -DinteractiveMode=false.
>>
>> Cheers, Indrajit
>>
>> References:
>> [1]http://maven.apache.org/plugins/maven-archetype-plugin/specification/...
>> [2]http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo....
>> [3]http://maven.apache.org/plugins/maven-archetype-plugin/create-mojo.html
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to