在我的pom.xml
中 <artifactId>rpm-maven-plugin</artifactId>
<version>2.0.1</version>
<goal>rpm</goal>
...
<mapping>
<directory>/etc/conf</directory>
<username>ME</username>
<groupname>ME</groupname>
<sources>
<source>
<location>../install.properties</location>
</source>
</sources>
</mapping>
...
使用上述/etc/conf
文件夹时,使用ME:ME
权限创建。
<mapping>
<directory>/etc/conf</directory>
<username>ME</username>
<groupname>ME</groupname>
<sources>
<source>
<location>../install.properties</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/etc/conf</directory>
<username>ME</username>
<groupname>ME</groupname>
<sources>
<source>
<location>../install2.properties</location>
</source>
</sources>
</mapping>
但是当我添加另一个映射时,使用/etc/conf
root:root
文件夹
我缺少什么?
答案 0 :(得分:1)
文档说:
directoryIncluded
If the value is true then the attribute string will be written for the directory
if the sources identify all of the files in the directory
(that is, no other mapping contributed files to the directory).
This is the default behavior.
由于在这种情况下有两个映射有助于同一目录,因此不会为spec文件中的目录编写%attr
。
我们可能需要再添加一个映射,如:
<mapping>
<directory>/etc/conf</directory>
<username>ME</username>
<groupname>ME</groupname>
</mapping>