After reading the tutorial about writing tasks  this tutorial explains how to get and set properties and how to use nested filesets and paths. Finally it explains how to contribute tasks to Apache Ant. The goal is to write a task, which searches in a path for a file and saves the location of that file in a property. We can use the buildfile from the other tutorial and modify it a little bit. That's the advantage of using properties—we can reuse nearly the whole script. The buildfile is in the archive tutorial-tasks-filesets-properties.
Ant - Creating JAR files
Ant - Building Projects - Tutorialspoint
In software development the term building usually means the conversion of source code and other artifacts, like images or configuration files, into another artifact. For example source code might be compiled into a JAR file, or you may create a new standalone application. The build result can be shared with users of the software or used only internally. A build tool is used to automate repetitive tasks during this process. This can be, for example, compiling source code, running software tests and creating files and documentation for the software deployment. Build tools typically run without a graphical user interface directly from the command line.
Apache NetBeans 12.3
In this chapter, we are going to deploy the web application directly to the application server deploy folder and then, we are going to add a few Ant targets to start and stop the services. Let us continue with the Hello World fax web application. This is a continuation of the previous chapter; the new components are highlighted in bold. Applications in Tomcat can be stopped and started using the Tomcat manager application. The URL for the manager application, username and password are also specified in the build.
Apache Ant builds itself, we are using Ant too why we would write a task if not? We choose a directory as root directory. All things will be done here if I say nothing different.