ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Master, Tariq \(Abbeywood\)" <Tariq.Mas...@uk.bp.com>
Subject No public execute() in com.mydomain.AllUpperCaseCondition
Date Thu, 01 Jun 2006 10:04:00 GMT
I get an error making my own custom condition.
I am using the example on:
http://ant.apache.org/manual/CoreTypes/custom-programming.html#customcon
ditions

It looks like AntTypeDefinitions wants it to have an execute() method,
though the dev guide states not to (I even checked the other condition
sources).  I was a bit confused by TaskAdapter.java's javadocs which
seem to indicate a condition needs an execute, but ConditionTask calls
eval() only.

Output:

mytest:
No public execute() in class com.bp.ist.ops.build.AllUpperCaseCondition

BUILD FAILED
C:\WORK\build.xml:168: No public execute() in class
com.mydomain.AllUpperCaseCondition
        at
org.apache.tools.ant.TaskAdapter.checkTaskClass(TaskAdapter.java:70)
        at
org.apache.tools.ant.TaskAdapter.checkProxyClass(TaskAdapter.java:85)
        at
org.apache.tools.ant.AntTypeDefinition.checkClass(AntTypeDefinition.java
:248)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:476)
        at
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        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.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 1 second
C:\WORK>ant -v -debug mytest


Environment: 
Apache Ant version 1.6.5 compiled on June 2 2005
Detected Java version: 1.4 in: C:\j2sdk1.4.2_11\jre
Detected OS: Windows XP

What am I doing wrong?


Tariq

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message