Start the Update Tool.
Expand the GlassFish Server Open Source Edition node.
Select the Available Add-ons node.
From the list, select the Apache Ant Build Tool check box.
Click Install.
Accept the license agreement.
After installation, Apache Ant appears in the list of installed components. The tool is installed in the as-install-parent/ant directory.
To use the ant command, add as-install/ant/bin to your PATH environment variable.