You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Marcus Vinicius <ma...@gmail.com> on 2011/01/25 04:26:24 UTC
Archetype multi module - optional modules
Hello,
I'm developing a multi module archetype. But i would like to offer to users
of my archetypes a option to choose which modules wants use, on runtime.
I`m using maven 2.2.1,
For example, when the user execute:
mvn archetype:generate
I could ask to user whats optional modules he wants use. I'm trying do it
modifying my archetype multi module, making modifications on this files:
archetype\src\main\resources\
archetype-resources\pom.xml
...
#if($useWebModule == "true")
<moduleweb</module
#end
...
archetype\src\main\resources\META-INF\maven\archetype-metadata.xml
...
<requiredProperty key="useWebModule" /
...
#if($useWebModule == "true")
<module id="${rootArtifactId}.web" dir="web" name="${rootArtifactId}.web"
#end
...
What do you think about? Why this way does not work.
Thanks a lot.
--
<http://www.reconcavotecnologia.org.br/>
Marcus Vinicius A. Silva
*P* *ANTES DE IMPRIMIR pense em sua responsabilidade e compromisso
com o MEIO AMBIENTE.*