5

我正在尝试将 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>
4

1 回答 1

5
        <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>
于 2013-05-31T17:06:50.820 回答