tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Pita" <carlosjosep...@gmail.com>
Subject Deploy from ant
Date Thu, 04 Jan 2007 20:35:10 GMT
Hi all,

how do I deploy a webapp from the ant deploy task avoiding it to copy
the entire application under tomcat/webapps? The point is to simply
update my build directory with modified jsps to make tomcat aware of
the changes. If this build directory, which of course is not under
webapps, is first copied under webapps by the ant deploy task, then
nothing is updated there each time I build the app, and instead I have
to explicitly redeploy it. One solution that comes to my mind is to
deploy an xml context descriptor instead of a exploded war directory.
But anyway, from the documentation here:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/source.html
http://tomcat.apache.org/tomcat-6.0-doc/appdev/processes.html

I would infer that deploying my application by means of a target like

  <target name="tomcat-deploy" depends="init,build,init-ant"
description="Deploy application to servlet container">
    <tomcat-deploy url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
                   password="${tomcat.manager.password}"
path="${tomcat.context.path}"
                   war="file://${project.build.path}" />
 </target>

will in principle install the application into tomcat without copying
it into webapps, which in practice it doesn't.  The following excerpts
from the above links seem to support my supposition:

"""
For interactive development and testing of your web application using
Tomcat 5, the following additional targets are defined:

    * install - Tell the currently running Tomcat 5 to make the
application you are developing immediately available for execution and
testing. This action does not require Tomcat 5 to be restarted, but it
is also not remembered after Tomcat is restarted the next time.
"""

(notice that the install target uses the deploy task, despite of its name)

"""
# Modify and rebuild as needed. As you discover that changes are
required, make those changes in the original source  files, not in the
output build directory, and re-issue the ant compile command. This
ensures that your changes will be available to be saved (via cvs
commit) later on -- the output build directory is deleted and
recreated as necessary.

# Reload the application. Tomcat will recognize changes in JSP pages
automatically, but it will continue to use the old versions of any
servlet or JavaBean classes until the application is reloaded. You can
trigger this by executing the ant reload command.
"""

Can you help me? I find this very confusing.

Thank you in advance.

Regards,
Carlos

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message