Java
  Home arrow Java arrow Page 11 - Development and Build System with ANT
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Development and Build System with ANT
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2005-09-08

    Table of Contents:
  • Development and Build System with ANT
  • Continuous Integration
  • Automating the Build Process with Apache’s Ant
  • Introduction to Ant
  • More on Targets
  • Properties
  • Case Study: Building the Technology Conference Management System with Ant
  • JavaDoc Generation
  • Checking Code Conventions with Checkstyle
  • Generating Source-Code Metrics
  • The all Target

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Development and Build System with ANT - The all Target


    (Page 11 of 11 )

    Finally, it’s a common practice to make the buildfile default target a target named “all,” which has in its dependencies a list of the targets that represented a full build of the system. If your build process has any noncritical targets that take a fair amount of time to generate, you can create new targets that will do whatever the all target does in addition to any extra work a target such as all-with-docs does. The point is that you want to minimize the amount of time that it takes to build the application so that developers don’t have noticeable interruptions in the flow of their work. A typical all target looks like this:

    <!-- ====================================================== -->
    <!-- Does it all
    -->
    <!-- ====================================================== -->
    <target
       
    name="all"
       
    depends="compile,..."
       
    description="Generates, compiles, packages and deploys."
    />

    Conclusions

    In this chapter you learned the importance of having a solid build system in place, the basics of the Ant build tool. You tailored an Ant buildfile to automate the build process of the TCMS system. The resulting buildfile reflects our experiences building many Java and J2EE applications. You can apply most of the ideas used in this file to your existing and future projects.

    As a programmer, you strive to write reusable software components and it’s natural to attempt to do the same with a system’s build scripts. It’s important to understand that Ant isn’t a scripting language and that complex tasks are meant to be encapsulated inside of Ant tasks. Therefore, if your buildfiles become too complex don’t feel compelled to stick solely with what’s distributed with Ant. Feel free to explore the countless commercial and Open Source Ant tasks available or begin writing your own.

     


     

    1. Marshall McLuhan and Quentin Fiore, The Medium Is the Massage: An Inventory of Effects (HardWired Books, 1996).

    2. See http://ant.apache.org/. 

    3. See http://ant.apache.org/ant_in_anger.html.

     


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    Buy this book now. This article is taken from chapter three of the book Enterprise Java Development on a Budget, written by Brian Sam-Bodden and Christopher M. Judd (Apress, 2004; ISBN: 1590591259). Check it out at your favorite bookstore today. Buy this book now.

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT