Bug 36523 - <java> task, incompatibleWithSpawn is too restrictive
Summary: <java> task, incompatibleWithSpawn is too restrictive
Status: ASSIGNED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.5
Hardware: All other
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-06 18:38 UTC by Bernard Cena
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Cena 2005-09-06 18:38:54 UTC
I'm trying to write a macro wrapper for <java> which provides sensible default 
values for attributes for our environment and manages the classpath. I've hit 
an issue with spawn and timeout attributes: if I supply a default value for 
timeout, then there is no way to use spawn="true". This is because the 
incompatibleWithSpawn flag is set when timeout is set with any default value, 
and it is impossible to reset timeout to null to enable spawn to be used. 
Perhaps the easiest thing to do is to relax the incompatibleWithSpawn check - 
surely spawn can be made to ignore timeout ?
This problem also applies to other tasks in general - it should be able to 
wrap tasks in macros or predefs without needing to code for special cases like 
this (similar problem will occur for junit and timeout settings, compiler 
setting for javac etc).
Comment 1 Steve Loughran 2005-09-06 18:46:34 UTC
can you check out the latest source from SVN, to see if it is better. Some
fixing of the bitsetting was done, but maybe not enough.

as it is, I have to agree with you; IMO we should not have an incompatible flag
on the setters, but work it out based on the state of values inside execute
itself(), the way most other tasks do. Patches would be welcome here, with the
caveat that as Java is used so broadly, we dont want to break anything