You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brett Randall <ja...@gmail.com> on 2008/11/27 01:53:10 UTC

archetype-catalog.xml location - archetype:crawl versus archetype:generate

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

Re: archetype-catalog.xml location - archetype:crawl versus archetype:generate

Posted by Brett Randall <ja...@gmail.com>.
Thanks Raphaël.  Your comments and the Jira issue make it clear.

Regards
Brett

On Thu, Nov 27, 2008 at 6:28 PM, Raphaël Piéroni
<ra...@gmail.com>wrote:

> 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 <ja...@gmail.com>:
> > 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
> >
>

Re: archetype-catalog.xml location - archetype:crawl versus archetype:generate

Posted by Raphaël Piéroni <ra...@gmail.com>.
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 <ja...@gmail.com>:
> 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
>