Maven 2 如何从maven dependency plugin:unpack的输出目录中删除该版本?

Maven 2 如何从maven dependency plugin:unpack的输出目录中删除该版本?,maven-2,maven,maven-dependency-plugin,Maven 2,Maven,Maven Dependency Plugin,我需要解包一个工件,并且我需要在几个地方(在多个文件中)使用它的解包位置。我不想每次更改版本时都要更新该位置的所有副本。有没有办法从输出目录中删除该版本?解包mojo似乎不支持stripVersion。试试以下方法: <properties> <extracted-artifact-location>${project.build.directory}/extracted-artifact</extracted-artifact-location> &

我需要解包一个工件,并且我需要在几个地方(在多个文件中)使用它的解包位置。我不想每次更改版本时都要更新该位置的所有副本。有没有办法从输出目录中删除该版本?解包mojo似乎不支持stripVersion。

试试以下方法:

<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>

${project.build.directory}/extracted工件
...
maven依赖插件
2.3
产生资源
打开
${提取的工件位置}

用于创建工件的插件是否提供了
xyzName
属性?例如,
jar插件
提供了,而
war插件
具有


如果是这样的话,您可以将属性设置为某个固定值。

这就是我所拥有的,它将提取的工件放在“${extracted artifact location}/${artifactId}-${version}/”中。我希望它位于“${extracted artifact location}/${artifactId}/”@Jared使用此配置,我最终直接在
${extracted artifact location}
目录中提取依赖项的内容。您需要发布配置以获得更多帮助。请显示来自您的pom的
maven依赖插件
的相关配置及其继承自的父pom。您能否发布来自
pom的
maven依赖插件
配置,以便我们进行调试?