The current chapter explains about ANT Packaging. In ANT Packaging, JAR and WAR files are zipped using JAVA jar tool.
JAR stands for JAVA Archive and contains resources, libraries and accessory files like property files.
WAR stands for Web Application Archive and has web application possessing jsp, javascript, and html files. These web applications are deployed into containers.
ANT Packaging chapter explains about:
WAR Structure
Making of WAR File and packaging
Description
Before building WAR files, the JUnit test process has to be completed successfully. The process of testing was explained in the previous chapter-JUnit Test. WAR File is the combination of jar file, web.xml file and the basic structure will be as follows.
Further
Process
One can also place the third party jar files in WEB-INF/lib directory using lib attribute. However, there are no such jar files and hence it remains empty.
The destination file can be given any name and must be placed in the build directory.webxml attribute defines the location of Web.xml file, which is in etc directory. All the HTML and JSP files are included using the fileset tag as discussed earlier.
zipfileset packages all the files like war files, images, and many more.
After including all the files, the file is ready to deploy into the server.