Recipe 7.10 Using Ant as an External Tool

     

7.10.1 Problem

You want to run Ant as an external tool.

7.10.2 Solution

Select Run External Tools External Tools, click Program, click New, and enter the required information to install Ant as an external tool. Then click Run to execute the build file.

7.10.3 Discussion

Eclipse can launch and run external tools as easily as internal ones. You can run Ant as an external tool if you want to: select Run External Tools External Tools, click Program, click New, and enter the name you want to give to the external version of Ant. As for the Location field, click Browse File System, and find the correct file for your operating system to run Ant (for example, that's ant.bat in the Ant bin folder in Windows). In the Working Directory field enter the directory of your build file, and enter any arguments you want to pass to Ant in the Arguments directory. Then click Run to execute your build file and perform the build.

External tools now can be run in the background, by a separate thread. Just check the "Run tool in background" checkbox in the Run External Tools External Tools dialog. Doing so means that you can let an Ant build run or launch an external program and still continue to work in Eclipse.


7.10.4 See Also

Recipe 7.5 on using your own version of Ant.



Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net