Ошибка по-прежнему присутствует в maven-archetype-plugin v3.0.1.
Для тех, кто не хочет понижать версию maven-resource-plugin. Мне удалось найти более или менее безобразный обходной путь.
Сначала вы переименуете archetype-resources / .gitignore в
__gitignore__
затем внутри archetype-metadata.xml
добавить
<requiredProperties>
<requiredProperty key="gitignore">
<defaultValue>.gitignore</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet>
<directory></directory>
<includes>
<include>__gitignore__</include>
</includes>
</fileSet>
</fileSets>
Когда генерируется архетип, maven теперь сначала скопирует __gitignore__
, затем увидит синтаксис __[file]__
и заменит его значением по умолчанию ".gitignore"