如何复制蚂蚁运行后创建的文件 [英] How to copy files created after ant run

查看:21
本文介绍了如何复制蚂蚁运行后创建的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的蚂蚁码

<?xml version="1.0" encoding="UTF-8"?>
<project default="plugin_export" name="build">
  <target name="plugin_export">
    <pde.exportPlugins destination="C:\" exportSource="false" exportType="directory" plugins="MyPlugin" useJARFormat="true" allowbinarycycles="true" filename="MyPlugin.jar" qualifier="X" />
    <waitfor maxwait="15" maxwaitunit="minute">
      <copy todir="j:\eclipse-rcp-juno-SR1-win32\dropins\">
        <fileset dir="c:\plugins\">
          <include name="*" />
        </fileset>
      </copy>
    </waitfor>
  </target>
</project>

它不起作用,因为我明白

it doesn't work, because I get

windows_build.xml:8:waitfor 不支持嵌套的copy"元素.

windows_build.xml:8: waitfor doesn't support the nested "copy" element.

pde.exportPlugins 部分由 eclipse 自动生成,它运行后台进程,用插件创建 jar.

pde.exportPlugins part is auto-generated by eclipse and it runs background process that creates jar with a plugin.

我想将该插件复制到我使用的 3 个 eclpse 实例中,并将其放入 dropins 文件夹中.怎么做?

I would like to copy that plugin into 3 instances of eclpse I do use and put it in the dropins folder. How to do it ?

推荐答案

要在构建完成后完成工作,您可以使用构建监听器.
Kev Jackson 在他的演示文稿中实现了一个非常有用的 exec-listener =
http://people.apache.org/~kevj/ossummit/extending-ant.html(演示文稿中包含来源).
对于每个构建结果( BUILD SUCCESSFUL | BUILD FAILED ),它提供了一个 taskcontainer您可以将所有应该在构建完成后运行的内容放入:

To get things done after your build has finished, you may use a buildlistener.
Kev Jackson implemented a very useful exec-listener in his presentation =
http://people.apache.org/~kevj/ossummit/extending-ant.html (sources are included in the presentation).
For each build result ( BUILD SUCCESSFUL | BUILD FAILED ) it provides a taskcontainer you can put all your stuff in that should run AFTER Build has finished :

<exec-listener onSuccess="true">
    <echo>Executing after BUILD SUCCESSFUL...</echo>
    <exec executable="..">
      <arg value="..."/>
    </exec>
    <mail ... />
   ..other tasks
  </exec-listener>
<exec-listener onSuccess="false">
    <echo>Executing after BUILD FAILED...</echo>
    <exec executable="..">
      <arg value="..."/>
    </exec>
    <mail ... />
   ..other tasks
  </exec-listener>

这篇关于如何复制蚂蚁运行后创建的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆