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/21 22:12:00 UTC
Archetype multi module
> 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.
>
>
>
> For example, when the user execute:
>
> mvn archetype:generate
>
>
>
> I could ask to user whats 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")
>
> <module>web</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,
>
>
>
> Marcus Vinicius A. Silva
>
>
: Archetype multi module
Posted by Marcus Vinicius <ma...@gmail.com>.
>> 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.
>>
>>
>>
>> For example, when the user execute:
>>
>> mvn archetype:generate
>>
>>
>>
>> I could ask to user whats 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")
>>
>> <module>web</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,
>>
>>
>>
>> Marcus Vinicius A. Silva
>>
>>