• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

UnDeploy task is not working properly

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a build.xml which will undeploy my existing web context and re-deploy it again. The build.xml is as below. But my requirement is I will send the condition from command line.

<!-- Tomcat Ant Tasks -->
<!--<project name="webmodulebuilder" default="remove" basedir=".">-->
<project name="webmodulebuilder" default="all" basedir=".">
<taskdef file="D:/AntExample/TomcatAnt/tomcatTasks.properties">
<classpath>
<pathelement path="C:\Program Files\Apache Software Foundation\Tomcat 5.0\server\lib\catalina-ant.jar"/>
</classpath>
</taskdef>


<target name="install" description="Install application in Tomcat" >
<deploy url="http://localhost:8080/manager/html"
username="admin"
password="admin"
path="/AdderWAR"
war="file:E://AntExample//AdderDeploy//dist//AdderWAR.war"/>
</target>

<target name="check-cond">
<condition property="cond-is-true">
<and>
<equals arg1="Yes" arg2="${x}" />
</and>
</condition>
</target>

<target name="uninstall" description="Remove application from Tomcat" depends="check-cond" if="cond-is-true">
<undeploy url="http://localhost:8080/manager/html"
username="admin"
password="admin"
path="/AdderWAR"/>
</target>

<target name="all" depends="uninstall, install" />
</project>

After execution of uninstall target it is saying BUILD FAILED. And not installing the new web module again. Can somebody look into the script and tell me if I am doing any mistake.

It is generating HTML dump like below . There is more HTML dump so I am pasting some part.

D:\AntExample\TomcatAnt>ant -Dx=Yes
Buildfile: build.xml

check-cond:

uninstall:
[undeploy] <html>
[undeploy] <head>
[undeploy] <style>
[undeploy] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,A
rial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;backgrou
nd-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Ta
homa,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;f
ont-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;} table {
[undeploy] width: 100%;
[undeploy] }
[undeploy] td.page-title {
[undeploy] text-align: center;
[undeploy] vertical-align: top;
[undeploy] font-family:sans-serif,Tahoma,Arial;
[undeploy] font-weight: bold;
[undeploy] background: white;
[undeploy] color: black;
[undeploy] }
[undeploy] td.title {
[undeploy] text-align: left;
[undeploy] vertical-align: top;
.
.
.
.
[undeploy] <hr size="1" noshade="noshade">
[undeploy] <center><font size="-1" color="#525D76">
[undeploy] <em>Copyright © 1999-2003, Apache Software Foundation</em></font></center>

[undeploy] </body>
[undeploy] </html>

BUILD FAILED



Thanks in advance
Srinivas Ivaturi.
 
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
undeploy is looking for the manager url, not the manager/html url.
deploy is going to fail when you get that far because file: should refer to an expanded web-app, use jar: to refer to a war.

How to use Tomcat Ant tasks
[ June 10, 2005: Message edited by: Ray Stojonic ]
 
I'm still in control here. LOOK at this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic