pom.xml在修复rpm-maven-plugin文件usrlibsystemdsystem冲突时的做法是什么?

问题描述 投票:0回答:1

我试着把jar和systemd单元打包到RPM中。

我的源代码 https:/github.compatsevantonconsul-demo。

https:/github.compatsevantonconsul-demoblobmasterbackendpom.xml#L120。

<mapping>
    <directory>/usr/lib/systemd/system</directory>
    <filemode>644</filemode>
    <username>root</username>
    <sources>
        <source>
            <location>src/main/scripts/backend.service</location>
        </source>
    </sources>
</mapping>

我得到错误信息。

Transaction check error:
  file /usr/lib/systemd/system from install of consul-backend-0.0.1-1.noarch conflicts with file from package systemd-219-62.el7_6.2.x86_64

pom.xml修复rpm-maven-plugin文件usrlibsystemdsystem冲突的做法是什么?

java maven systemd rpm-maven-plugin
1个回答
1
投票

您的配置是想创建 /usr/lib/systemd/system 目录是错误的。你必须修改 rpm-maven-plugin 的配置。

<mapping>
    <directory>/usr/lib/systemd/system</directory>
    <filemode>644</filemode>
    <username>root</username>
    <groupname>root</groupname>
    <directoryIncluded>false</directoryIncluded>
     ..
© www.soinside.com 2019 - 2024. All rights reserved.