background preloader

Ant

Facebook Twitter

j2ee

Continuousintegration. Build.  Introducing JBoss Tattletale 1.0 BETA1. Use ANT to Build a JAR with version/build number - Real's J. Ant - Mailing List. Using Ant as a Text Substitution Preprocessor. This paper describes two ways to use Ant that can be very useful during development, independent of whether you are using Java.

One, for JExamples, helped me manage duplicated values in a large style sheet; another, for Amberpoint, made it easy for development team members to build a version of our application for "localhost", "production" and other desired runtime environments. During development, there is often a need to create symbolic references in a source file, and set the value of those references via an external file. This might be done to create a more convenient place to maintain those values, or as a way to control certain aspects of application behavior from outside the source code. Examples: In Cascading Style Sheet (.css) files, there is no support for symbolic references, so the same color value (e.g.

#CC6633) or font information (e.g. "arial, helvetica, sans-serif") must be repeated throughout a .css file. Create Symbolic Names in a Cascading Style Sheet $ ant antTemplates. Incremental and fast builds using Ant. A good build tool and process should not perform needless and redundant time-consuming work on unchanged sources each time the build runs. In other words, it should only do the work required to apply the results of the source modifications to the build artifacts. If your build tool or process doesn't exhibit this behavior, then think about optimizing your builds by avoiding the needless work. For example, assume we have a bottom-up build process—our project is built from a persistency layer up to higher layers. Usually, these kinds of projects have long builds caused by the code-generation and reverse-engineering tools used in them.

Now assume that a developer working on this system's source code has slightly modified an if-else block and wants to see the results of his change. In this article, I introduce some techniques to save you time by preventing redundant rebuilds of up-to-date sources and doing faster builds on outdated sources. Continuous integration The make build tool. TheElementsOfAntStyle - Ant Wiki. The original version of this document was created by Steve Loughran and Erik Hatcher for Java Development with Ant. It was used by permission (verified with the author ErikHatcher) AndrewCOliver General principles Let Ant be Ant. Don't try to make Ant into Make. (submitted by Rich Steele, eTrack Solutions, Inc.)

Design for componentization. A small project becomes a large project over time; splitting up a single build into child projects with their own builds will eventually happen. Use <property location> to assign locations to properties, rather than values. Design for maintenance. Will your build file be readable when you get back to it six months after the project is finished? Document the build process. Never neglect false positive test case failures. Environment conventions The items in this section assume that you are launching Ant through the wrapper scripts, such as the provided ant.bat, ant.sh, antrun.pl, or antrun.py. Run without a classpath. Use ANT_OPTS to control Ant? <? <? General.