有没有办法通过执行rpm-maven-plugin来避免在最终的rpm包中创建完整的目录路径?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1.1</version>
<extensions>true</extensions>
<executions>
<execution>
<id>attach-rpm</id>
<goals>
<goal>attached-rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<group>client2-scripts</group>
<mappings>
<mapping>
<directory>/opt/bbmc/bin</directory>
<filemode>750</filemode>
<username>elasticsearch</username>
<groupname>elasticsearch</groupname>
<sources>
<source>
<location>src/main/</location>
<includes>
<include>commons/config/*.ini</include>
<include>commons/config/*.properties</include>
<include>*/*.py</include>
</includes>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
生成的目录结构如下:
opt
bbmc
bin
bbto793
*.py
...
而不是所需的:
opt
bbmc
bin
*.py
答案 0 :(得分:1)
将src/main
中的文件放在您要在rpm中传递的相同结构中。