Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Exception Error in <condition > Task

Exception Error in <condition > Task

2007-07-06       - By David Weintraub

I have a build.xml file that contains the <condition> task like this:

<condition
   property="tarball.name"
   value="${label}.arm.tgz"
   else="arm.tgz">
   <isset property="label"/>
</condition>

When I run this file, the condition operation works. However, when I
run the same build from CruiseControl, I get the following error:

/home/build/build/ARM/arm/build.xml:94: Class
org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else"
attribute.
  at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper
.java:516)
  at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable
.java:368)
  at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable
.java:322)
  at org.apache.tools.ant.Task.maybeConfigure(Task.java:254)
  at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:189)
  at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
  at org.apache.tools.ant.Task.perform(Task.java:363)
  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)

According to the documentation, The "else" parameter was added to the
<condition> task back in Ant 1.3, and the only two revisions of Ant I
have are Ant 1.7 and Ant 1.65. (And, I am using Ant 1.7 in
CruiseControl). Even weirder is that there is another CruiseControl
project that has a similar <condition> task using the "else"
parameter, and it works. In both projects, CruiseControl is simply
calling build.xml with ant, so I don't think there's some sort of
environmental difference between the two.

Is there something I should be looking for?

--
David Weintraub
qazwart@(protected)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.