Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 57509 invoked from network); 2 Jul 2002 12:37:42 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Jul 2002 12:37:42 -0000 Received: (qmail 22713 invoked by uid 97); 2 Jul 2002 12:37:44 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 22610 invoked by uid 97); 2 Jul 2002 12:37:44 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 22578 invoked by uid 50); 2 Jul 2002 12:37:43 -0000 Date: 2 Jul 2002 12:37:43 -0000 Message-ID: <20020702123743.22576.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 10404] New: - The way in which property values are used can at times be very unintuitive X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10404 The way in which property values are used can at times be very unintuitive Summary: The way in which property values are used can at times be very unintuitive Product: Ant Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Core tasks AssignedTo: ant-dev@jakarta.apache.org ReportedBy: wtff@freenet.de I would like to do a very simple thing: Test network conditions (socket, http) and generate a report that tells me if every network resource is up or not. I found that doing this can be very complicated because of some interrelating issues. - property values can be true, false or NOT SET, also a property can be set only once and is then like a constant. - the waitfor/condition tasks set a property to true or leave it unset. Now, if I wanted to test whether a socket is active and report this, I would like to do it like this: Port 3302 on Server 1 available : ${socket.server1.3302} However, the first issue is that within the task, it is not possible to specify, how much time is allotted to the sub expressions to be evaluated. Instead, for this I have to take the task. First of all, there shouldn't be a waitfor tasks at all because instead, one should rather include the timout capabilities into the condition task. Second, the logik of the waitfor task is an inverted one: a property can be set (to true in the default case), if a timeout is reached. The notion of the condition task is better: if the condition is true, the property will be set to true. If a timout occurs, then the logical notion to maintain, would be to set the property value to false. The second problem is, that properties set from any of these two tasks are either set to a value or they are not being set at all!! This is awkward in the case of reporting, because the echo statement in the above example will either output "Port 3302 on Server 1 available : true" or, "Port 3302 on Server 1 available : ${socket.server1.3302}" Therefore, in order to achieve just a simple socket test, not waiting for hours for its timeout in case if it should fail, AND at the same time achieving a pretty output, I would have to write s.th. like this: w1 w2 -- To unsubscribe, e-mail: For additional commands, e-mail: