maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Amerson (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (ARCHETYPE-274) Conditionally include or exclude a file from archetype during generation
Date Tue, 28 Aug 2018 03:39:00 GMT

    [ https://issues.apache.org/jira/browse/ARCHETYPE-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594461#comment-16594461
] 

Gregory Amerson edited comment on ARCHETYPE-274 at 8/28/18 3:38 AM:
--------------------------------------------------------------------

I agree with [~ljnelson]  Allowing filtering of archetype-metadata.xml would allow the control
over which files are included or excluding via property expansion.  Unless someone is working
on this, our company is willing to work on this feature request.


was (Author: gamerson):
I agree with [~ljnelson]  Allowing filtering of archetype-metadata.xml would allow the control
over which files are included or excluding via property expansion.  Unless someone is working
on this, our company will work on this feature request.

> Conditionally include or exclude a file from archetype during generation
> ------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-274
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-274
>             Project: Maven Archetype
>          Issue Type: Improvement
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>            Reporter: Dan Allen
>            Priority: Major
>
> I would like to be able to control which files are placed into the generated project
based on the value of a property that is defined during archetype:generate. For instance,
I forsee the following prompt:
> Define value for groupId: : com.example
> Define value for artifactId: : myproject
> Define value for package:  com.example: :
> Define value for extraSupport: : y
> Based on the value of extraSupport, I want to include (or not include) a file in the
generated project. If the user does not want the extra support, I don't want to clutter up
the generated project with unnecessary files.
> It's all about customization of the project based on what the developer intends to use.
While I could create a whole other archetype, sometimes the changes are so slight that it
would be easier to include/exclude a file.
> Is there a way to control this behavior using the archetype-metadata.xml descriptor?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message