Giovanni van der Schelde created ARCHETYPE-684:
--------------------------------------------------
Summary: Not providing a directory element in the fileset results
in a null directory instead
Key: ARCHETYPE-684
URL: https://issues.apache.org/jira/browse/ARCHETYPE-684
Project: Maven Archetype
Issue Type: Bug
Components: Generator
Affects Versions: 3.3.0, 3.2.1
Reporter: Giovanni van der Schelde
Attachments: reproducer.zip
When you have a directory structure like:
{code:java}
src/
main/resources/
src/
example.yml{code}
And a fileSet in the archetype-descriptor like:
{code:java}
<fileSet>
<!-- <directory></directory> -->
<includes>
<include>*.yml</include>
</includes>
</fileSet> {code}
When you generate the archetype you won't get the .yml files, but instead you
get an empty directory with the name `null`.
When you explicitly provide the <directory> element, the `null` directory
disappears and the .yml file is copied.
I think it would make sense to either;
a) Log an error or warning that the xml is incomplete
b) When no directory is provided, use a default (of the root directory) instead
Where option B makes to most sense to me.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)