我正在尝试在 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>
...生成的规范文件是:
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 都不会生成。
有输入吗?
谢谢大家
编辑1:
使用 Maven 2 和 3 构建 - 结果是相同的。