2

rpm-maven-plugin を使用して rpm パッケージを作成しようとしています。

%pre スクリプトレット (またはその他のスクリプトレット) を生成するまでは、すべてうまくいきます。

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 タグは関連するマッピングを生成しますが、わかりやすくするためにここでは削除されています。いずれにせよ、sciptlets は生成されません。

入力はありますか?

皆さんありがとう

編集1:

Maven 2 と 3 の両方で構築 - 結果は同じです。

4

1 に答える 1

2

プラグインのバージョンの問題のようです...

スクリプトレットをサポートするために必要なバージョンは、2.0-beta-2 ではなく2.1-alpha-1です。

于 2010-10-31T08:18:37.130 に答える