Chapter 5.2 Build.xml Configuration File

The ant tool manages the compilation of all Java source code files. This tool also handles the creation of the deployment hierarchy. build.xml is a build file which controls the Ant operation and defines the required processing steps.

The build.xml file provides the developers targets and its description documentation that support optional development activities. To display the project documentation, follow these steps:

1. Go to the directory containing the build.xml file.

2. Type ant -projecthelp.

You can customize and install the basic build.xml file in the project source directory. The build file contains the following targets:

  • clean – The clean target deletes existing build and dist directories.
  • compile – Use this target to compile any updated source code since the last time compilation took place.
  • all – Use this target as a short cut for running the clean target, followed by the compile target.
  • javadoc – This target creates Javadoc API documentation for the Java classes in this web application.
  • dist – This target creates a distribution directory for your application.

  • Currently 3.04/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
  Flag Inappropriate Content 0 comments