Updating war file with ant
In our example, we have a simple target to provide an informational message to the user. For example, a deploy target may have a dependency on the package target, the package target may have a dependency on the compile target and so forth.
The path data type is commonly used to represent a class-path.For this exercise, create a file called anywhere in your computer with the following contents in it: Note that there should be no blank line(s) or whitespace(s) before the xml declaration.If you allow them, the following error message occurs while executing the ant build - The processing instruction target matching "[x X][m M][l L]" is not allowed.The case-sensitive filter is applied to the fileset which means a file with the name will not be excluded from the fileset.Using a filterset data type along with the copy task, you can replace certain text in all files that matches the pattern with a replacement value.It is used as a filter to include or exclude files that match a particular pattern. Here, the src attribute points to the source folder of the project.
The fileset selects all files in the source folder except those contain the word 'Stub'.
The following data types are provided by Apache Ant.
The fileset data types represents a collection of files.
All build files require the project element and at least one target element.
The XML element project has three attributes : A target is a collection of tasks that you want to run as one unit.
However there is no restriction on the file name or its location.