1

アーティファクトを解凍する必要があり、解凍した場所を複数の場所 (複数のファイル) で使用する必要があります。バージョンを変更するたびに、その場所のすべてのコピーを更新する必要はありません。出力ディレクトリからバージョンを取り除く方法はありますか? アンパックモジョでstripVersionがサポートされているようには見えません。

4

2 に答える 2

0

アーティファクトの作成に使用しているプラ​​グインはxyzNameプロパティを提供しますか?たとえば、jar-pluginはを提供しfinalName、はwar-pluginを持っていwarNameます。

その場合は、プロパティを固定値に設定できます。

于 2011-11-18T19:40:07.163 に答える
-1

これを試して:

<properties>
    <extracted-artifact-location>${project.build.directory}/extracted-artifact</extracted-artifact-location>
</properties>
...
<build>
    <plugins>
        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.3</version>
            <executions>
                <execution>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId><fixme></groupId>
                                <artifactId><fixme></artifactId>
                                <version><fixme></version>
                                <outputDirectory>${extracted-artifact-location}</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
于 2011-11-18T15:32:58.120 に答える