maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Vinicius <marcus...@gmail.com>
Subject Archetype multi module - optional modules
Date Tue, 25 Jan 2011 03:27:17 GMT
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.*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message