具有多个映射的maven rpm插件
我正在构建一个rpm包,其中包括一个3PP软件和其他配置文件。当我没有包含配置文件时,rpm会正确构建,但当我包含配置文件时,rpm构建会失败,但在实验室中安装3PP软件会失败。 以下是我的pom.xml的快照:具有多个映射的maven rpm插件,maven,rpm-maven-plugin,Maven,Rpm Maven Plugin,我正在构建一个rpm包,其中包括一个3PP软件和其他配置文件。当我没有包含配置文件时,rpm会正确构建,但当我包含配置文件时,rpm构建会失败,但在实验室中安装3PP软件会失败。 以下是我的pom.xml的快照: <properties> <rpm-root>/opt</rpm-root> <comp-name>mycompany</comp-name> <install-path>mgmt<
<properties>
<rpm-root>/opt</rpm-root>
<comp-name>mycompany</comp-name>
<install-path>mgmt</install-path>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<configuration>
<mappings>
<mapping>
<directory>${rpm-root}</directory>
<configuration>true</configuration>
<sources>
<source>
<location>src/main/binary</location>
</source>
</sources>
</mapping>
<mapping>
<directory>${rpm-root}/${comp-name}/${install-path}/config</directory>
<directoryIncluded>false</directoryIncluded>
<configuration>true</configuration>
<sources>
<source>
<location>src/main/config</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
在这种情况下,3PP(opendj)的安装失败
如果我没有在rpm插件中包含配置文件,我会得到以下结果:
/opt/mycompany/mgmt/config/mgmt.properties
/opt/opendj/Legal/license_to_accept.txt
/opt/opendj/QuickSetup.app/Contents/Info.plist
**/opt
/opt/opendj**
/opt/opendj/Legal
/opt/opendj/Legal/license_to_accept.txt
/opt/opendj/QuickSetup.app
/opt/opendj/QuickSetup.app/Contents
/opt/opendj/QuickSetup.app/Contents/Info.plist
您可以看到,在本例中,包创建了目录/opt和/opt/opednj等。。
在这种情况下,3PP(opendj)的安装成功
谢谢