我需要使用 maven 解压耳朵存档并将其复制到本地目录,是否有 maven 插件可以做到这一点?我使用了maven上传插件来复制文件,但无法解压。请帮忙...
2 回答
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack</id>
<phase>clean</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>A</groupId>
<artifactId>ear</artifactId>
<version>version</version>
<type>ear</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/ear</outputDirectory>
<excludes>**/*.jar</excludes>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
你试过maven ear插件吗?
http://maven.apache.org/plugins/maven-ear-plugin/
我想这会将耳朵内容爆炸到目标目录。请浏览示例
或者 maven 依赖插件也可以提供帮助。
http://maven.apache.org/plugins/maven-dependency-plugin/usage.html