You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Scott Simpson <ss...@local.com> on 2007/04/23 21:30:41 UTC

Any way to optionally include an attribute in an ant task?

I want to optionally include an attribute in a task. Is this possible?
That is, I'm using the csc task and if I'm creating an executable, I
want to include the attribute "mainclass" like
 
<csc mainclass="..."
 
but if the "mainclass" property isn't set, I want it to run like
 
<csc ...
 
without the mainclass attribute.