我正在使用 maven-antrun-plugin 将 jar 文件解压缩到文件夹中。这个 jar 文件在每个构建中生成,并且有一个变体 TIMESTAMP(如下面的代码片段所示)。如何将 jar 文件解压缩到与 jar 文件同名的文件夹中?例如,文件夹应该是 /sample_TIMESTAMP 而不是 /folder
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>unpack-jar-features</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo message="unpack jar file" />
<unzip dest="/folder">
<fileset dir="/folder">
<include name="sample_TIMESTAMP.jar" />
</fileset>
</unzip>
</target>
</configuration>
</execution>
</executions>
</plugin>