ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Shostak <mshos...@austin.rr.com>
Subject Ant Tomcat Tasks Problem
Date Fri, 20 May 2005 14:13:52 GMT

I am trying to implement the Tomcat tasks into my build file, and
I'm having some trouble that I hope some of you can help me figure out.
I'm using Ant 1.6.2 and jakarta-tomcat-5.0.25 on Linux Redhat WS3.

I have a tomcat.properties file in the same directory as my build file,
and it contains

webapp.version=1.0
tomcat.server=localhost
tomcat.manager.url=http://localhost:8080/manager/html
tomcat.manager.username=admin
tomcat.manager.password=<the admin passwd>

I also have tomcatTasks.properties in the same directory containing
some task definitions, among them:

deploy=org.apache.catalina.ant.DeployTask
list=org.apache.catalina.ant.ListTask
etc.

I have included these two files in my build with

<project basedir="." default="all" name="MyProj">
    <property file="tomcat.properties">
     ...

    <taskdef file="tomcatTasks.properties">
        <classpath>
            <pathelement path="${tomcat.home}/server/lib/catalina-ant.jar"/>
        </classpath>
    </taskdef>
     ...
    <target name="list" description="List Tomcat applications">
        <list url="${tomcat.manager.url}"
            username="${tomcat.manager.username}"
            password="${tomcat.manager.password}"
    </target>
</project>

However, when I execute the list target, instead of getting a list of tomcat
apps, I get a bunch of html printed out to the console.  Here's just a 
snippet:

ant -buildfile package.xml list
Buildfile: package.xml
 
list:
     [list] <html>
     [list] <head>
     [list] <style>
     [list] H1 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

H2 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

H3 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

BODY 
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} 
B 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} 
P 
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A 
{color : black;}A.name {color : black;}HR {color : #525D76;}  table {
     [list]     width: 100%;
     [list]   }
     [list]   td.page-title {
     [list]     text-align: center;
     [list]     vertical-align: top;
     [list]     font-family:sans-serif,Tahoma,Arial;
     [list]     font-weight: bold;
     [list]     background: white;
     [list]     color: black;
     [list]   }

and at the end I get a "BUILD FAILED" message because of an exception:

        at 
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:239)
        at 
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:132)
        at org.apache.catalina.ant.ListTask.execute(ListTask.java:49)
        at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: <html>
        at 
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:235)
        ... 12 more

I don't know where to go from here.  Any ideas?

Thanks,

Matt



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message