archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarrod Roberson <jar...@vertigrated.com>
Subject Re: auto generating an archetype-catalog.xml when navigating to a root/archetype-catalog.xml
Date Fri, 17 Jun 2011 02:03:26 GMT
On Thu, Jun 16, 2011 at 8:41 PM, Brett Porter <brett@apache.org> wrote:

> On 17/06/2011, at 6:13 AM, Jarrod Roberson wrote:
>
> > I am trying to add this feature to Archiva, but I can't figure out where
> to
> > start?
> >
> > This is a critical feature I need to add for our environment in order to
> > enabled my distributed team to create projects from a standard set of
> > company archetypes?
> >
> > What I need to know is:
> >
> > 1. How to search all the repositories for artifacts of packaging type
> > "maven-archetype"?
>
> Are you working against trunk (unreleased, and significant changes to the
> repository APIs), or trying to patch Archiva 1.3.x?
>
>
I want to patch up 1.3.x where X is the latest.


> >
> > 2. How / Where to add a simple Servlet so that it will respond to
> > http://[archiva]/archetype-catalog.xml
> > with the results of all the available archetypes I find in the available
> > repositories?
>
> Do you want to generate it dynamically, or have it a flat file that is
> updated whenever a new archetype is added to the repository (or occasionally
> repopulated by a scan)?
>
>
Whatever is the simplest to implement, I am manually creating a
archetype-catalog.xml and dumping in /opt/archiva/apps/archiva right now. If
I could get a plugin that did the same thing but automatically that would be
fine.


> >    I need to combine the internal and snapshot ( and any others )
> > repositories for this to really be useful. But I am only using internal
> and
> > snapshot right now.
>
> This should just appear as the normal catalog at the root of a repository
> group, right?
>

I am just dumping it at the root of the application in my case
/opt/archiva/apps/archiva/archetype-catalog.xml
There is a <repository/> element in each entry that points back to which
repository the archetype lives in.

>
> > I forked the project on GitHub and will contribute my solution back there
> > when I get it working.
>
> Great, welcome! Please pardon our dust as Olivier is doing quite a bit of
> trunk cleanup at the moment. I hope that doesn't get in your way :)
>
>
Thanks for the help, I will report back what I get done. There is a bug open
for this 1284, maybe I can get that closed.

PS: I decided I might could do this with mvn archetype:crawl and a cron job,
but I can't get mvn archetype:crawl to generate a file, it walks the
internal and snapshots directory structures and spews out all the artifacts,
but never generates a file. I am using Maven 3.0.3 by the way.



-- 
Jarrod Roberson
678.551.2852

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message