Create War using Ant Build File

Creating WAR files with Ant is extremely simple, and very similar to the creating JAR files task. After all, WAR file, like JAR file is just another ZIP file. Here we will show you how to use Ant build script to manage a web application project, create a WAR file and deploy to Tomcat.

The WAR task is an extension to the JAR task.

Attributes for WAR Task-

  • webxml->Path to the web.xml file
  • lib-> A grouping to specify what goes into the WEB-INF\lib folder.
  • classes-> A grouping to specify what goes into the WEB-INF\classes folder.
  • metainf-> Specifies the instructions for generating the MANIFEST.MF file.

No comments:

Post a Comment