You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Antonel Pazargic (JIRA)" <ji...@codehaus.org> on 2013/03/06 21:40:53 UTC

[jira] (ARCHETYPE-424) Conditionally include or exclude a fileSet from an archetype when project is generated

    [ https://jira.codehaus.org/browse/ARCHETYPE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=321548#comment-321548 ] 

Antonel Pazargic commented on ARCHETYPE-424:
--------------------------------------------

I am working on a multi module projects, and each new module might have a couple of supports (JPA, REST, Cache) based on developer input (through archetype custom properties).
Based on chosen supports some files have to be generated.

So far I don't find a way to address this.

Is there a hope to have such a support in maven archetype generator?

Thank you.    
                
> Conditionally include or exclude a fileSet from an archetype when project is generated
> --------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-424
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-424
>             Project: Maven Archetype
>          Issue Type: New Feature
>            Reporter: Adrian
>
> I'm creating a project generating code samples for accessing Oracle and Mainframe.
> I want to conditionnaly generate the samples based on user input
> Define value for groupId: : com.example
> Define value for artifactId: : myproject
> Define value for package:  com.example: :
> Define value for SGBD Sample : : Y
> Define value for Mainframe Sample : : N
> Could it be possible to add this functionnality ?
> i.e. This could be done by adding an attribute into fileSet element which would indicate if the fileSet directive needs to be taken into account :
> {code:xml}
> <fileSet filtered="true" encoding="UTF-8" enable="${mainframeSample}">
> 	<directory>src/main/java</directory>
> 	<includes>
> 		<include>mainframe/*.java</include>
> 	</includes>
> </fileSet>
> {code}
> Some links : 
>  * [http://stackoverflow.com/questions/1919704/how-do-i-conditionally-include-or-exclude-a-file-from-an-archetype-when-project]
>  * [ARCHETYPE-58|http://jira.codehaus.org/browse/ARCHETYPE-58] (this one didn't adressed this issue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira