ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doremieux, Olivier" <Olivier.Doremi...@fc.celera.com>
Subject RE: Exec Class cast exception
Date Wed, 09 Aug 2000 18:02:21 GMT
The Object I am getting back from project.createTask("exec"); is an
ExecTask.
SignJar is doing it the exact same way, so there might be a problem with
SignJar.

Olivier

-----Original Message-----
From: Cory Wandling [mailto:cory@objectdynamics.com]
Sent: Wednesday, August 09, 2000 11:06 AM
To: ant-user@jakarta.apache.org
Subject: Re: Exec Class cast exception


Try debugging it by getting back an Object asking for its class and then
printing that out.

final Object cmd = project.createTask("exec");
System.out.println(cmd.getClass().getName());

Cory

----- Original Message -----
From: Doremieux, Olivier <Olivier.Doremieux@fc.celera.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, August 09, 2000 12:44 PM
Subject: Exec Class cast exception


> I am trying to create my own task, but with the following line I am
getting
> a ClassCastException. What am I doing wrong
>
>     final Exec cmd = (Exec)project.createTask("exec");
>
> java.lang.ClassCastException: org.apache.tools.ant.taskdefs.ExecTask
>         at signtoolTask.execute(signtoolTask.java:21)
>         at org.apache.tools.ant.Target.execute(Target.java:132)
>         at org.apache.tools.ant.Project.runTarget(Project.java:720)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:451)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:425)
>         at org.apache.tools.ant.Main.runBuild(Main.java:298)
>         at org.apache.tools.ant.Main.main(Main.java:119)
>
> Thank you
>
> Olivier

Mime
View raw message