rpm-maven-plugin - maven post-remove 尝试删除映射文件
问题描述
我正在使用 maven 创建一个可用于安装我的应用程序的 rpm。
在我的映射中,我指定了一个目录,其中包含安装后步骤所需的文件:
<mappings>
<mapping>
<directory>${rpm.info.install_dir}</directory>
<filemode>700</filemode>
<sources>
<source>
<location>src/main/resources/install</location>
</source>
</sources>
</mapping>
</mappings>
在我的安装后步骤中,我使用这些文件,并在步骤结束时删除目录。结果,在删除后步骤中,我收到了多个错误,即目录中的所有文件${rpm.info.install_dir}
都不存在:
Remove 1 Package
Installed size: 46 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : my-app-1.0.0-SNAPSHOT.noarch 1/1
warning: file /data/install/file1.conf: remove failed: No such file or directory
warning: file /data/install/file2.conf: remove failed: No such file or directory
warning: file /data/install/dir1/file1.service: remove failed: No such file or directory
我猜 rpm 将尝试在删除后步骤中删除规范文件 (%files) 中提到的所有文件。有什么办法可以避免这种行为?我确实想在安装后步骤之后删除安装目录,而不是等到客户决定删除 rpm。
解决方案
推荐阅读
- r - 如何将值中的字符串转换为属性和值?
- python - 拆分熊猫列
- c++ - 为什么我的动态分配的数组不起作用?
- typescript - 您是否应该在后端上下文中仅传递 userId 或整个用户
- python - Matplotlib 绘图函数输出与 seaborn 的线图不同
- bash - 在 while 循环中使用 curl 来访问 Wikipedia 的 API
- sql - SQL Server:基于多个日期创建摘要
- ios - 在 crashlytics 中报告关于部分申请关闭的崩溃
- pytorch - TorchServe CORS 设置
- java - 通过控制台启动器从命令行运行 JUnit5 测试,包括 lib.jar