我需要解压缩一个工件,我需要在几个地方(多个文件中)使用它的解压缩位置。我不想每次更改版本时都要更新该位置的所有副本。有没有办法可以从输出目录中删除版本?它看起来不像解包mojo支持stripVersion。
答案 0 :(得分:0)
答案 1 :(得分:-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>