How to copy files created after ant run

My Ant code

<?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 does not support the nested copy element.

The pde.exportPlugins part is automatically generated by eclipse and starts the background process that creates the jar with the plugin.

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

0
source share
1 answer

So that everything is done after the assembly is completed, you can use the buildlistener.
Kev Jackson implemented a very useful exec-listener in his presentation =
http://people.apache.org/~kevj/ossummit/extending-ant.html (sources included in the presentation).
For each build result (BUILD SUCCESSFUL | BUILD FAILED) it provides a taskcontainer, you can put all your materials in what should be done AFTER the build:

 <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> 
+2
source

All Articles