build : Java Glossary


Introduction Stages of Life vis a vis Build Tools
Function Links


If you have a large project, you often want a way to avoid recompiling everything. You want something to track what really needs to be recompiled. It is actually a little more subtle than examining the timestamps to see which files have changed since the last compile. If unchanged files use static final constants that may have changed, they too need to be recompiled. Various tools make various brave attempts at deciding what needs to be recompiled. However, it is wise to recompile the universe from time to time in case something slipped through the cracks, especially the final build and test before shipping. Any tool for doing this in generically called a make.


A build tool tackles one or more of the following problems:

  1. loading Javac.exe only once rather than once per soure file or once per package. Javac.exe is incredibly fast if you don’t keep reloading it.
  2. Figuring out which *.java files need to be recompiled.
  3. Figuring out which *.class files should go in which jars.
  4. Collecting class files into jar files.
  5. Digitally signing jar files.
  6. Figuring out which jar files have to be rebuilt because some of its contained class files have changed.
  7. Running unit tests.
  8. Preparing files for distribution.
  9. Managing a source code repository

Stages of Life vis a vis Build Tools

  1. If you are a newbie, you build your jars manually at the command line with jar.exe.
  2. Then you progress to using BAT (Batch) file scripts.
  3. You might then use JavaCompiler interface to load javac.exe once and compile everything.
  4. Then you start using ANT which is not all that different from running BAT scripts.
  5. Then you add GenJar to manage your dependencies (figuring out which class files belong in which jars). However, it will fail if your projects get big.
  6. Then you add Ivy to manage your dependencies.
  7. Ant’s XML (extensible Markup Language) is pretty clumsy and does not encourage encapsulation, so you augment ANT (A Neat Tool) with Java programs that generate ANT scripts.
  8. Generating ANT scripts is indirect and gives you little power to control what happens when the script runs, so you might eventually dump XML and use Gradle’s much more programmerly syntax. It more for a corporation than a hobbyist. Learning such a complicated and powerful tool is quite an investment.
  9. Then you get a job with a large corporation. They use Maven which is XML based and very rigidly structured. You have to use it whether you like it or not. You may also learn it simply because so many open source projects now are distributed as Maven repositories.
  10. Then you go for continuous integration tools like Jenkins that use servers to continuously build and test software as teams check in modules.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number