我正在尝试将 Maven 3 创建的 .jar 复制到另一个位置。
目前,我正在使用 Ant 的复制任务,但 Maven 根本不复制文件。
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<copy file="target/myfile.jar" tofile="D:/Bukkit/plugins/myfile.jar"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
最佳答案
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<copy file="target/myfile.jar" tofile="D:/Bukkit/plugins/myfile.jar"/>
</tasks>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
关于maven - 用maven复制一个jar文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16862271/