The archetype-metadata.xml can used used to further tune the archetype. This file describes filesets of the following format:
If the filtered property is set to true then all ${reference} are resolved. The built-in references are: groupId,version,artifactId,rootArtifactId,package .... If packaged is set to true then a directory tree representing the package is created before the resources are copied. Remember these are Velocity templates so you should be able to use Velocity control statements (note: I've not tried these yet)
Once you are happy with the archetype you can execute mvn install to install the archetype. This archetype should now appear in the list when you execute mvn archetype:generate. You can release the archetype if you have your own remote repository. You will however need to create a achetype-catalog.xml if you want other users to use this archetype from your own remote repository. The archetype-catalog.xml file should look like the following:
You can then use this archetype to create a project using the following command: