rpm-maven-plugin
rpm-maven-plugin copied to clipboard
Two soft links under one mapping not work as expected
Version: 2.1 Case: add two symbolic links in one mapping like this
<mapping>
<directory>/var/lib/${project.artifactId}</directory>
<sources>
<source>
<location>target/some_source_dir</location>
</source>
<softlinkSource>
<location>/var/log/${project.artifactId}</location>
<destination>logs</destination>
</softlinkSource>
<softlinkSource>
<location>/etc/${project.artifactId}</location>
<destination>conf</destination>
</softlinkSource>
</sources>
</mapping>
And one linked directory contain files (e.g. /etc/${project.artifactId}
) than other one not.
Result: Every file under /etc/${project.artifactId}
links undo /var/lib/${project.artifactId}
instead whole directory
/var/log/${project.artifactId}
source ignored at all
Any single soft link works fine
Expected: two links under /var/lib/${project.artifactId}
- logs
and conf
Workaround: use separated mapping for each soft link:
<mapping>
<directory>/var/lib/${project.artifactId}/logs</directory>
<sources>
<softlinkSource>
<location>/var/log/${project.artifactId}</location>
</softlinkSource>
</sources>
</mapping>