File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant reload task works, but... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant reload task works, but..." Watch "Ant reload task works, but..." New topic

Ant reload task works, but...

Ra Re

Joined: Nov 13, 2009
Posts: 6
I am trying to deploy, undeploy and reload a Java EE Web application under Tomcat 6 using Ant 1.7.

All of these tree tasks are "working", deploy and undeploy are working as expected but reload does to say that...does not.....reload?

Reading the Ant documentation I have found this:
# Reload not supported on WAR deployed at path /foo
Currently, application reloading (to pick up changes to the classes or web.xml file) is not supported when a web application is deployed directly from a WAR file. It only works when the web application is deployed from an unpacked directory. If you are using a WAR file, you should undeploy and then deploy or deploy with the update parameter the application again to pick up your changes.

So the question is, how can I deploy directly from an unpacked directory? I only know how to config the Ant deploy task using a WAR file, is that my mistake?

This is part of my build.xml:

By now, I have the update="true" attribute in the deploy task because reload does not work for me, but I would like to be able to remove it and use the reload task to update the changes on the application.

I agree. Here's the link:
subject: Ant reload task works, but...
jQuery in Action, 3rd edition