Chapter 7. Executing External Programs


Part of the build process involves testing what you've built, and an obvious way of doing that is to run the results of a build. Doing so from Ant involves using the tasks detailed in this chapter: java, exec, and apply. You can check the return code from your build to ensure things worked out; if not, you can halt the build before you deploy faulty build results.

Executing code to test it is a fundamental part of the build process, and this chapter covers that aspect of Ant. Besides running your code, you can start and stop external programs needed to test your code, such as when you want to run a JUnit test on a Web application and need to start a web server. The tasks in this chapter do more than the usual internal Ant tasks, and because they're designed to deal with the external run-time environment, so they're a little more involved than usual.



    Ant. The Definitive Guide
    Ant: The Definitive Guide, 2nd Edition
    ISBN: 0596006098
    EAN: 2147483647
    Year: 2003
    Pages: 115
    Authors: Steve Holzner

    Similar book on Amazon

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