Ant is a java based build-tool. Ant replaces other tools such as "make" "nmake". Ant uses a XML-based build script and is itself an open source project. Since Ant is written in Java, the same build scripts can run on any platform.
To build the project from Eclipse, right click on build.xml file and select 'Run Ant...'. Then choose the target you want: "dist" is the default task which builds and prepares the distribution staging area.
Modify the build.properties file and add set the property
install.dir=
For debugging a servlet, you need have the servlet JVM running in debug
mode.
In Servlet Exec, go to Virtual Machine->Options and add the following
options:
To compile and install, stop the web server. Select 'Run Ant...' again,
unselect "dist" and select "install" to install the build to your install
location. Start web server.
To debug, select Run->Debug...
Right click on 'Remote Java Application' and select New, enter a Name.
Select your project. Select Connection Type: Standarad(Socket Attach)
In Connection Properties, enter Host: localhost and Port 8000 (or 8080).
Click Apply and then click on Debug. Open any source file and put a
break point by right click on the left gray bar of the source window
-Xrunjdwp:transport=dt_socket,server=y,addrress=8000,suspend=n
-Xdebug
Debugging the Application
Eclipse allows you to debug the JVM running in the web server using Java
Debug Wire Protocol. With this you can debug web servers on a remote
machine as well as your local machine. The JVM options set above enable
the JVM to debug remotely.