On Monday, September 16, 2002, at 04:13 PM, Dominique Devienne wrote:
> Welcome back Diane ;-)
>
> Just a reminder, my hack to allow any Task-deriving task to have a
> nested <condition> was of course never accepted.
Gotta say - having every task support if/unless, or a nested condition,
would make a lot of tasks much easier. Vis:
<target name="jar with manifest" if="jar.main-class">
<jar>
<fileset .../>
<manifest>
<attribute name="Main-Class" value="${jar.main-class}"/>
</manifest>
<jar>
</target>
<target name="jar without manifest" unless="jar.main-class">
<jar>
<fileset .../>
<jar>
</target>
is more open to breakage and has more targets than one with if on every
task:
<target name="jar">
<jar if="jar.main-class" >
<fileset .../>
<manifest>
<attribute name="Main-Class" value="${jar.main-class}"/>
</manifest>
<jar>
<jar unless="jar.main-class" >
<fileset .../>
<jar>
</target>
Of course, the ideal would be
<jar>
<fileset .../>
<manifest>
<attribute name="Main-Class" value="${jar.main-class}"/>
</manifest>
<jar>
as we then do not end up with 2^n different targets or tasks within a
target based on n different boolean options.
Scott
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>