Hi,
Do any one had the time to comment the sources and/or the first doco
http://mojo.codehaus.org/maven-archetypeng ?
Here is a proposition of refactored descriptor which attemps
to introduce: the use of attributes, the possibility to copy files,
and customised template groups (root, 1->3° level).
Please feel free to comment this naive proposition.
Unless homogenous desire, i whould have dropped the 1° and 2° levels templates.
<?xml version="1.0" encoding="UTF-8"?>
<archetype partial="true" >
<name>Archetype Name</name>
<required-properties>
<required-property>
<key>propertyKey</key>
<default-value>Default value</default-value>
</required-property>
</required-properties>
<sources-groups>
<sources-group language="java" >
<templates>
<template encoding="UTF-8" binary="false">
<path>App.java</path>
</template>
</templates>
</sources-group>
</sources-groups>
<test-sources-groups>
<test-sources-group language="java" >
<templates>
<template encoding="UTF-8" binary="false">
<path>AppTest.java</path>
</template>
</templates>
</test-sources-group>
</test-sources-groups>
<resources-groups>
<resources-group directory="resources">
<templates>
<template encoding="UTF-8" binary="false">
<path>app.properties</path>
</template>
</templates>
</resources-group>
</resources-groups>
<test-resources-groups>
<test-resources-group directory="resources">
<templates>
<template encoding="UTF-8" binary="false">
<path>test(app.properties</path>
</template>
</templates>
</test-resources-group>
</test-resources-groups>
<site-group>
<templates>
<template encoding="UTF-8" binary="false">
<path>apt/index.apt</path>
</template>
</templates>
</site-group>
<root-group>
<templates>
<template encoding="UTF-8" binary="false">
<path>.classpath</path>
</template>
</templates>
</root-group>
<first-level-groups>
<first-level-group>
<first-level>project-repository</first-level>
<templates>
<template binary="true">
<path>com/company/project/1.0/project-1.0/project-1.0.jar</path>
</template>
</templates>
</first-level-group>
</first-level-groups>
<second-level-groups>
<second-level-group>
<first-level>src</first-level>
<second-level>environment</second-level>
<templates>
<template encoding="UTF-8" binary="false">
<path>production.env.sh</path>
</template>
</templates>
</second-level-group>
</second-level-groups>
<third-level-groups>
<third-level-group packaged="true" >
<first-level>src</first-level>
<second-level>it</second-level>
<third-level>java</third-level>
<templates>
<template encoding="UTF-8" binary="false">
<path>AppITTest.java</path>
</template>
</templates>
</third-level-group>
</third-level-groups>
<projects>
<project>
<module>project-artifact-id</module>
</project>
<sources-groups>
...
</sources-groups>
<test-sources-groups>
...
</test-sources-groups>
<resources-groups>
...
</resources-groups>
<test-resources-groups>
...
</test-resources-groups>
<site-group>
...
</site-group>
<root-group>
...
</root-group>
<first-level-groups>
...
</first-level-groups>
<second-level-groups>
...
</second-level-groups>
<third-level-groups>
...
</third-level-groups>
</projects>
</archetype>
Regards,
Raphaël