ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Any way to optionally include an attribute in an ant task?
Date Tue, 24 Apr 2007 11:26:05 GMT
>> a) Why do you have "sometimes" the value for mainclass set 
>and sometimes not? 
>Because sometimes I'm building a DLL and sometimes an 
>executable depending on whether mainclass is set.
>> b) You could use conditional targets (<target if="mainclass">)
>But then I'd have to repeat the target twice. I don't want to do that.

Because you (should) know while implementing the buildfile what to
generate you can do

<presetdef name="dll">
    <csc --set-some-common-attributes-- />
<presetdef name="exe">
    <dll mainclass="..."/>

<dll .../>
<dll .../>
<exe .../>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message