ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: TelnetTask.java
Date Mon, 24 Dec 2001 08:26:58 GMT
Johannes, adding regexp support would indeed make telnet more robust.

why dont you submit it to ant-dev, having a look at the ant task guidelines
first about a) how to submit changes to a task, b) what is expected in
documentation and changes, c) why tabs are not allowed in the source.

Looking at the code, I think it'd be critical to copy the regexp mapper and
use the regexp library support found in org.apache.tools.ant.util.regexp,
particularly:
org.apache.tools.ant.util.regexp.RegexpMatcher;
org.apache.tools.ant.util.regexp.RegexpMatcherFactory;

This regexp package provides a layer of indirection and will pick up on any
of the supported regexp implementations found on the classpath, rather than
have support for a single one hard coded into a task.

If you can add that, and still ensure that telnet runs without any regexp
package being present (dont want to break someone elses build), then you
would probably stand a good chance of getting it into the build.



----- Original Message -----
From: "Johannes van der Merwe" <jpvdm@iafrica.com>
To: <ant-user@jakarta.apache.org>
Sent: Sunday, December 23, 2001 23:09
Subject: TelnetTask.java


> I have added regular expression capabilities to TelnetTask.java so that
one
> can build more sophisticated sequences-I also made some new attributes:
> flags defaults to RE.MULTILINE, and verbose to false. One can specify
either
> a string or regex. I have changed the while loops a bit in the
> waitForRegex() function(please check whether this kind of logic make more
> sense), and made it return a string - this helps a lot with debugging
> sequences. The default flags is 8, meaning multiline recognition.
>
> Kind regards
> Jo van der Merwe
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message