Hello Christian,

please read the manager app documentation for Tomcat 5 to explain all deploy parameter.

Here my ant task for remote (war) and local deployment:

Here my build.properties

server.url=http://localhost:7380
app.name=myapps
app.path=/${app.name}
app.version=1.0-dev
app.url=${server.url}/${app.name}/
app.home=${basedir}/build/${app.name}.war
app.context=${basedir}/tomcat/${app.name}.xml
manager.username=manager
manager.password=tomcat
manager.url=${server.url}/manager

...
<target name="deployremote" description="Install application to servlet container">
<echo message="${app.path}"/>
<echo message="${app.home}"/>
<deploy url="${manager.url}" username="${manager.username}"
password="${manager.password}"
path="${app.path}"
war="file:${app.home}"
update="true"/>
</target>
<target name="deploylocal" description="Install application to servlet container">
<echo message="${app.path}"/>
<echo message="${app.context}"/>
<echo message="${app.home}"/>
<deploy url="${manager.url}" username="${manager.username}" password="${manager.password}"
path="${app.path}"
localWar="file:${app.home}"
config="file:${app.context}" />
</target>
<target name="undeploy" description="Remove application on servlet container">
<undeploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}"/>
</target>


You see that file:<absolute-path>/${app.name}.war or file:<absoulte>/${app.name}.war work for me.
Only thing is, that you need a undeploy call for local deployment. A update flag not exists. I hope
we can change this for 5.next.


regards
peter

Christian Nelson schrieb:

Greetings,

I'm using the ant DeployTask in two different scenarios. One works as desired, the other not so much. I'm trying to figure out what I'm not doing right.

Scenario 1: Deploy a packaged .war file.

This is works great. The war parameter to the install task is war="jar:file:/${basedir}/${dist}/${war.application}!/" (which obvious resolves to a real file once the properties are set. The problem is I need to go through the whole undeploy, create war, deploy war cycle.

Scenario 2: Deploy a unpacked (exploded) web app (which exists on the server).

If I take the .war and explode it, and then try to add the directory where it lives as follows:

war="file:/${basedir}/war/"

It reports success, and shows up when the web applications are listed, but it's not really set-up correctly because the file "web-inf/web.xml" doesn't seem to be processed. Here's why I think that:

INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/archiver]


Note: I have also tried the InstallTask, and I've tried both 5.0.27 as well as 4.1.30.


Really, my goal, and I don't care how I achieve it, is that during development, I want to have tomcat serving the exploded version of the app so I can make changes on the fly (or with a reload) instead of having to undeploy, war, deploy with each change. What's the best way to do this?

Thanks in advance,
Christian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to