Optional mapping sections in Maven RPM plugin?

The best I've been able to come up with is omitting the <includes> tag, which takes everything from what's specified in <location>.

location

The file or directory to include. If a directory is specified, all files and subdirectories are also included.

You will need to be as specific as possible in the path for these mappings that don't have include patterns specified. I added confs to the location below to avoid pulling in everything else in project.build.directory.

Even if no files are selected, the <directory> will still be created.

<mapping>
  <directory>/etc/myconfig</directory>
  <configuration>true</configuration>
  <sources>
    <source>
      <location>${project.build.directory}/confs</location>   
    </source>
  </sources>
</mapping>