> -----Original Message----- > From: Peter Donald [mailto:[EMAIL PROTECTED] > Sent: Sunday, 3 March 2002 2:27 PM > To: Ant Developers List > Subject: Re: cvs commit: > jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core > Available.java ConditionTask.java OsCondition.java Fail.java IfTask.java > > > On Sun, 3 Mar 2002 13:19, [EMAIL PROTECTED] wrote: > > * Moved <available> to antlib. This is no longer a task, just a > > condition. Removed all file checking, which will be done by > other condition > > implementations. > > Can you describe what you mean here? How do you see conditions > being set. I > was going to eventually get around to having > > <file-available/> > <resources-available/> > etc > > How do you see it behaving? >
The same. The plan was to chop up <available> into 3 or 4 separate conditions. The new <available> checks for classes and resources in a classpath, so it probably could do with further splitting into <class-available> and <resource-available>. As far as file checking goes, there's plenty of stuff we can do there. I've added the <file-test> condition (ok, the name needs work), which can be used to test a (vfs) file using a set of file selectors: <file-test file="some/vfs/file"> <is-file/> </file-test> A condition that did the same for a set of files would probably be handy too. And a condition that searches a path for a file. Now that it is so easy to add these things, we can go nuts adding implementations. I've added a few thoughts to the todo list. > > > * A target can now take both an "if" and an "unless" condition. > > I don't like this because it complicates an already complex area. > Personally > I don't think targets should have conditions at all but I guess they are > going to need to for backwards compatability with ant1.x :( > I have to agree. I'd either like to see "if" and "unless" go, or I'd like to see a far more expressive model for dependency traversal. Let's go the simpler option, and axe the target conditions altogether, so that all the conditional stuff ends up as tasks inside the targets. Adam -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
