On Sun, 2005-10-30 at 12:27 +0000, Alex McManus wrote: > I'm just getting to grips with Maven for the first time, and having some > difficulties getting archetypes to add files to an existing project. If > I understand things correctly, archetypes can also be used to add files > to an existing project, as well as to create a new one from scratch. > This is controlled via the <allowPartial> element in the archetype.xml file.
Correct. > First question: why do none of the core archetypes support partial > behaviour? It is a new feature that was added specifically for the getting started guide so that a site can be added to an existing project. I also wanted to be able to build up large projects but the site archetype was the first stage. Just a matter of resources and time to adjust or add new archetypes that can be additive. > It seems to make sense that I can use the quickstart > archetype to setup my initial project, then add web capabilities with > the webapp archetype, and then add site documentation with the site > archetype. Absolutely. > Each of these archetypes creates discrete directories under > src that would seem to be able to co-exist with each other. There are definitely cases where you don't want an archetype to be partial but the site archetype and archetypes that might be used to build up a j2ee app would are good examples of useful partial archetypes. > Second question: does anyone have the allowPartial behaviour working in > an archetype (and are there any examples that I can look at)? I've tried > to setup some simple examples, but I always get the some error as above. You can use the quickstart archetype with the site archetype. The site archetype is currently the only partial archetype. You can look at the getting started guide where it's described: http://maven.apache.org/guides/getting-started/index.html > My apologies if I'm missing something blindingly obvious, any help would > be appreciated... It's just that the archetypes haven't been adjusted yet. -- jvz. Jason van Zyl jason at maven.org http://maven.apache.org We all have problems. How we deal with them is a measure of our worth. -- Unknown --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
