【问题标题】:Maven RPM Plugin does not generate the scriptlets specifiedMaven RPM 插件不生成指定的 scriptlet
【发布时间】:2014-01-15 09:24:16
【问题描述】:

我正在尝试在 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

注意:mappings 标签确实会产生相关的映射,但为了清楚起见,此处已将其删除。无论哪种方式 - sciptlet 都不会生成。

有什么意见吗?

谢谢大家

编辑 1:

使用 Maven 2 和 3 构建 - 结果相同。

【问题讨论】:

    标签: maven-plugin rpm rpm-spec rpm-maven-plugin


    【解决方案1】:

    好像是插件版本的问题……

    支持 scriptlet 所需的版本不是 2.0-beta-2,而是 2.1-alpha-1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-14
      • 2012-03-13
      • 2015-03-23
      • 2014-07-27
      • 2019-12-07
      • 2017-10-04
      • 2014-10-06
      相关资源
      最近更新 更多