Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Top 15 Ant Best Practices

Top 15 Ant Best Practices Ant, building and deploying Java applications required a hodgepodge of platform-specific scripts, makefiles, proprietary IDEs, or manual processes. Now, nearly every open source Java project uses Ant. A great number of companie

Tutorial Details:

Ant tips or best practices. Many were inspired by mistakes made on previous projects, or from horror stories relayed to me from other developers. One person told me of a project where XDoclet-generated code was placed into a version- control tool that locks files. When a developer changes a source file, they must remember to manually check out and lock all of the files that will be regenerated. They must then manually run the code generator, and only then can they tell Ant to compile the code.
All of the tips in this article assume the Ant buildfile is an important artifact that must be written with care, maintained in version control, and refactored periodically
1. Adopt Consistent Style Conventions
2. Put build.xml in the Project Root Directory
3. Prefer a Single Buildfile
4. Provide Good Help
5. Provide a Clean Target
6. Manage Dependencies Using Ant
7. Define and Reuse Paths
8. Define Proper Target Dependencies
9. Use Properties for Configurability
10. Keep the Build Process Self-Contained
11. Use Version Control
12. Use Ant as the Least Common Denominator
13. Use zipfileset
14. Perform the Clean Build Test
15. Avoid Platform-Specific Ant Wrappers










 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Top 15 Ant Best Practices

View Tutorial:
Top 15 Ant Best Practices

Related Tutorials:

Advanced form processing using JSP
This article examines the processing of a user registration form using JSP and JavaBeans while implementing the Memento design pattern.
 
Printing in Java, Part 4 - JavaWorld February 2001
Printing in Java, Part 4 - JavaWorld February 2001
 
Think small: Java on Compaq's iPAQ
Think small: Java on Compaq's iPAQ
 
JSP best practices
Follow these tips for reusable and easily maintainable JavaServer Pages
 
Best tools for mobile application development
Best tools for mobile application development
 
Axis-orizing objects for SOAP
Axis-orizing objects for SOAP
 
Java tools reign supreme - JavaWorld celebrates the leading Java tools
Java tools reign supreme - JavaWorld celebrates the leading Java tools
 
Overcome J2SE 1.3-1.4 incompatibilities
Overcome J2SE 1.3-1.4 incompatibilities
 
Top 15 Ant Best Practices
Top 15 Ant Best Practices Ant, building and deploying Java applications required a hodgepodge of platform-specific scripts, makefiles, proprietary IDEs, or manual processes. Now, nearly every open source Java project uses Ant. A great number of companie
 
Interesting ...
Interesting ...
 
Advanced Installer for Java
Advanced Installer for Java The quick, simple and powerful msi authoring tool Advanced Installer is a Windows Installer authoring tool which enables developers and system administrators to easily build reliable MSI packages that meet the latest Micr
 
Flexible User and Environment Ant Configuration
Flexible User and Environment Ant Configuration The de facto standard for building, packaging, and deploying Java applications is Apache Ant. Small differences in developers\' environments or preferences may cause problems with some Ant tasks that invo
 
End-to-end internationalization of Web applications
End-to-end internationalization of Web applications Going beyond the JDK A typical Web application workflow involves a user loading one of your Webpages into her browser, filling out HTML form parameters, and submitting data back to the server. The ser
 
Writing Ant Tasks
Writing Ant Tasks A nice feature of Ant is that it is designed to allow you to add your own tasks and use them in an build. This article shows you the basics of writing an Ant task and how to get a task to work.
 
Struts best practices
Multiple options are available for solving problems with Struts. When deciding among these alternatives, the choice must be based on parameters such as the scale of work and availability of time.
 
Build scripts with Groovy and Ant
Build scripts with Groovy and Ant Summary In nearly all developers' toolboxes, Ant is the standard build tool for Java applications, thanks to its open, standard, and multiplatform structure. Though it represents a great improvement in automating produc
 
Commons-Math: The Jakarta Mathematics Library
Commons-Math: The Jakarta Mathematics Library The Java programming language and the math extensions in Commons Lang provide implementations for only the most basic mathematical algorithms. Routine development tasks such as computing basic statistics or s
 
Lucene in Action
Lucene in Action Lucene is a gem in the open-source world--a highly scalable, fast search engine. It delivers performance and is disarmingly easy to use. Lucene in Action is the authoritative guide to Lucene. It describes how to index your data, includin
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Configuring JumpStart Servers to Provision on Sun x86-64 Systems (pdf)
Solaris JumpStart technology provides a mechanism for fully automating the installation of the Solaris Operating System. This Sun BluePrints article describes how to modify existing JumpStart servers to support the deployment of the Solaris OS and Linux
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.