如何在archetype-metadata.xml中包含与项目pom同级的文件

问题描述 投票:0回答:1

我创建了一个具有以下结构的 Maven 自定义原型:

原型结构

当我使用命令

mvn archetype:generate
创建项目时,不包含 app.xmlapp.properties 文件。怎么解决?

maven maven-2 maven-3 maven-plugin maven-archetype
1个回答
0
投票

将以下条目添加到您的archetype-metadata.xml

    <fileSet filtered="true" packaged="false" encoding="UTF-8">
      <directory/>
      <includes>
        <include>app.xml</include>
        <include>app.properties</include>
      </includes>
    </fileSet>
© www.soinside.com 2019 - 2024. All rights reserved.