I have the need to create for a custom archetype. But just to expand and filter files as the archetype plugin supports is not enough, I need to do some more customization after the files got expanded. Now I've seen that the plugin supports a parameter called 'goals' and the docu says this about it: 'Additional goals that can be specified by the user during the creation of the archetype' (http://maven.apache.org/plugins/maven-archetype-plugin/generate-mojo.html#goals). But unfortunatly I can't find any documentation about how I can specify any goals while creating the archetype.
The following works:
$> mvn archetype:generate -DarchetypeCatalog=local -Dgoals=antrun:run
But this has some major disadvantages: - The configuration of the goal has to be defined in the final POM of the new project - The user using the archetype has to know about the additional parameter
Has anyone an idea how the 'goals' parameter is realy meant to be used? Or has an idea how I can achieve my original target?