Home arrow Java arrow Page 11 - Development and Build System with ANT
JAVA

Development and Build System with ANT


This article will describe some of the development tools that are available from the Java Open Source community and explore how they can help you create high-quality software in a predictable and reproducible fashion, saving you precious time and money. It 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).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 25
September 08, 2005
TABLE OF CONTENTS:
  1. · Development and Build System with ANT
  2. · Continuous Integration
  3. · Automating the Build Process with Apacheís Ant
  4. · Introduction to Ant
  5. · More on Targets
  6. · Properties
  7. · Case Study: Building the Technology Conference Management System with Ant
  8. · JavaDoc Generation
  9. · Checking Code Conventions with Checkstyle
  10. · Generating Source-Code Metrics
  11. · The all Target

print this article
SEARCH DEVARTICLES

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.

blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- 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 ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials