我有一个 Maven RPM 插件映射,因此:
<mapping>
<directory>/etc/myconfig</directory>
<configuration>true</configuration>
<sources>
<source>
<location>${project.build.directory}</location>
<includes>
<include>*.conf</include>
</includes>
</source>
</sources>
</mapping>
但是,根据打包过程,可能有零个 .conf 文件要放入 /etc。发生这种情况时,RPM 插件会说:
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.2:rpm (default) on project clients:
Unable to copy files for packaging: You must set at least one file. -> [Help 1]
有没有办法让映射部分对包含零文件感到满意?