Ant Packaging Applications - Apache Ant

What is Ant Packaging Applications?

We have learnt the specific aspects of Ant using the hello world Fax web application in bits and pieces.

Now it is time to place everything together to create a full and entire build.xml file. remember and build.xml files as follows:

Build. Properties


In this example:

  • We first declare the course to the webapps folder in Tomcat in the build properties file because the deploy.path variable.
  • We additionally declare the supply folder for the java files inside the src.dir variable.
  • Then we declare the source folder for the web files inside the web.dir variable. javadoc.dir is the folder for storing the java documentation, and build.dir is the path for storing the build output files.
  • Then we claim the name of the web application, which is fax in our case.
  • We also define the master class path which includes the JAR files present in the net-INF/lib folder of the project.
  • We also include the class files present inside the build.dir within the master class path.
  • The Javadoc target produces the javadoc required for the task and the utilization target is used to print the common objectives that are present in the build file.

The above example indicates two deployment targets : deploy and deploywar.

The install target copies the files from the web listing to the deploy directory keeping the final changed date time stamp. that is useful when deploying to a server that supports hot deployment.

The easy target clears all of the previously built files.

The deploywar target builds the war file and then copies the struggle file to the install directory of the application server.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Apache Ant Topics