ant 中使用ant-Plugin插件进行文件的copy

来源:互联网 发布:淘宝卖家图片处理软件 编辑:程序博客网 时间:2024/05/18 02:04



一、首先配置maven-antrun-plugin这个插件:

    <plugin>   <groupId>org.apache.maven.plugins</groupId>   <artifactId>maven-antrun-plugin</artifactId>   <version>1.8</version>   <executions>      <execution>         <id>id.clean</id>         <phase>package</phase>         <goals>            <goal>run</goal>         </goals>         <configuration>            <target>               <echo>clean phase${project.build.directory}</echo>               <copy todir="D:\Program Files\jetty-distribution-9.2.7.v20150116\webapps"><fileset dir="${project.build.directory}" includes="**/*.war"></fileset><span style="white-space:pre"></span></copy><echo>sssssssssssssssssssssss${project.build.directory}</echo>            </target>         </configuration>      </execution>        </executions>  </plugin>
插件的目标就是:run,插件的配置就是在configuration中配置ant的target的动作;

在打包后的阶段就会执行把生成的war包发布到jetty的webapps这个目录中;

0 0