This problem is known.
http://jira.codehaus.org/browse/ARCHETYPE-142

the crawl goal is intended to create a catalog for a remote repository
(but called in the fs of that repository)

the local catalog is intended to be updated : by hand
or by the create-from-project goal.

This is why the locations are different. Please note
that the crawl goal can be configured to create a catalog
in another directory from where it search.

Hope this helps.


Raphaël

2008/11/27 Brett Randall <[EMAIL PROTECTED]>:
> Hi,
>
> I've just started working with our own archetypes, so very possible that I
> am missing something here:
>
> 1) We created a new archetype and "mvn install" -ed it to local.
> 2) Went to ~/.m2 (on Windows) and ran "mvn archetype:crawl".  This created
> archetype-catalog.xml in the sub-directory "repository".
> 3) Ran "mvn archetype:generate -DarchetypeCatalog=local", but could not
> locate the archetype.
> 4) Noticed that the documenation
> here<http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html#archetypeCatalog>suggests
> that -DarchetypeCatalog=local is a synonym for
> file://~/.m2/archetype-catalog.xml (i.e. not
> file://~/.m2/*repository*/archetype-catalog.xml
> .
> 5) Moved archetype-catalog.xml up one folder and everything is fine -
> archetype:generate finds the catalog.
>
> So do archetype:crawl and archetype:generate have different expectations on
> where archetype-catalog.xml should live, and is this expected?
>
> Thanks
> Brett
>

Reply via email to