James Arlow created ARCHETYPE-459:
-------------------------------------
Summary: Ability to include empty subdirectories
Key: ARCHETYPE-459
URL: https://jira.codehaus.org/browse/ARCHETYPE-459
Project: Maven Archetype
Issue Type: Improvement
Components: Archetypes
Affects Versions: 2.2
Environment: Eclipse Kepler SR1; m2e 1.4
Reporter: James Arlow
Currently the artifact-metadata.xml will allow only allow you to include empty
directories if each is explicitly specified in a unique fileset element. It
doesn't allow you to specify a folder that holds empty sub-directories with
<include>**/**</include>.
Even if these empty directories are included in the /archetype-resources/
folder of the archetype.jar they will not be created from by the
archetype:generate goal when the archetype is applied.
Explicitly specifying every empty directory does not scale well, in terms of
simplicity and clarity of configuration. Another user pointed out that the
current behavior prevents filtered results from working properly with certain
SCM situations, as well.
Since the original pom.xml is not packaged inside the archetype.jar,
archetype:generate cannot be signaled to change this behavior using the plugin
version or configuration pom elements, as with other optional maven features
such as the resource plugin equivalent.
Additionally, the desired behavior might differ per fileset pattern, and should
not default to on, since it might corrupt the output of archetypes already
deployed.
I think the best system would be to add a behavior qualifier as an attribute on
the fileset pattern elements in archetype-metadata.xml:
<!-- to include empty dirs -->
<include empty-dirs="true">**/**</include>
<!-- to prevent exclusion of empty dirs -->
<exclude empty-dirs="false">**/**</exclude>
I've tested these attributes in my current archetype projects, and they do not
break compatibility; they just have no effect. Thus, they can be enabled by
updating the installed version of the archetype plugin, if the features are
added.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)