我正在尝试在 rpm-maven-plugin 的帮助下创建一个 rpm 包。
一切顺利,直到我尝试让它生成 %pre scriptlet(或任何与此相关的 scriptlet)
pom.xml 摘录如下:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.0-beta-2</version>
<executions>
<execution>
<goals>
<goal>attached-rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<copyright>Copyright 2010 XXX, Inc. All rights reserved</copyright>
<vendor>XXX, Inc.</vendor>
<group>Applications/System</group>
<packager>${env.USER}</packager>
<needarch>true</needarch>
<prefix>/usr/xxx</prefix>
<mappings></mappings>
<preinstallScriptlet>
<script>echo "installing now"</script>
</preinstallScriptlet>
</configuration>
</plugin>
...生成的 Spec 文件是:
Name: Server
Version: 1.0.0.0
Release: 01_1
Summary: Server Maven Webapp
License: Copyright 2010 XXX, Inc. All rights reserved
Vendor: XXX, Inc.
Group: Applications/System
Packager: yaneeve
Prefix: /usr/xxx
BuildRoot: ....../target/rpm/buildroot
%description
Server
%files
注意:映射标签确实会生成相关映射,但为了清楚起见已在此处删除。无论哪种方式 - sciptlet 都不会生成。
有什么意见吗?
谢谢大家
EDIT 1:
使用 Maven 2 和 3 构建 - 结果是相同的。
好像是插件版本的问题...
支持 scriptlet 所需的版本不是 2.0-beta-22.1-α-1
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)