You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sebastien Blanc <Se...@alcatel.com> on 2003/05/28 05:18:01 UTC
jython
Hello !
does anybody know of an equivalent of the javascript
projName.getUserProperty / projName.createTask calls for jython (or
jptyhon) BSF ? the only link I found on jython <script> is the
following:
http://www.lonsteins.com/articles/jython-bsf.html
and it does not mention ANT integration.
[btw I currently script becoz I can't find an ANT way to simulate a
while loop (the only way I would have think of, would have been if the
waitFor task would have supported a nested <antcall>); seems to me that
waitFor is interesting to use when the condition is set internally to
the ANT system with parallel although when it is an external condition
(for instance looking up a log file for an expected trace) I don't find
any solution.]
thanx.
seb.
Re: jython
Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 28 May 2003, Sebastien Blanc <Se...@alcatel.com>
wrote:
> when you say server, you mean HTPP server or any kind of server ?
Any kind of server whose availability can be tested by connecting to a
single socket 8-)
In case of a HTTP server, the <http> condition may be better suited.
Stefan
Re: jython
Posted by Sebastien Blanc <Se...@alcatel.com>.
Hi !
when you say server, you mean HTPP server or any kind of server ? for
instance in case of an application server, a lot of services are open on
different ports and I'm not sure that having the latest service deployed
will mean that's an app srv is ready; for instance the deployment of beans
still has to take place after JNDI, JMS and so on have been started (I'm
using JBOSS for instance); the client can use CORBA or RMI but both
services are started long before the server is effectively ready. does
someybody have experience to share with RMI ?
thanx.
seb.
Stefan Bodewig wrote:
> On Tue, 27 May 2003, Sebastien Blanc <Se...@alcatel.com>
> wrote:
>
> > does anybody know of an equivalent of the javascript
> > projName.getUserProperty / projName.createTask calls for jython
>
> Without trying and being the Python neophyte I am, I'd expect them to
> simply look the same as in JavaScript (without the semicolon at the
> end).
>
> All the objects exported to JavaScript should also be exported to
> Jython.
>
> > seems to me that waitFor is interesting to use when the condition is
> > set internally to the ANT system with parallel although when it is
> > an external condition (for instance looking up a log file for an
> > expected trace) I don't find any solution.
>
> It really depends on the "external" condition.
>
> <waitfor> combined with a <socket> condition works great to wait for a
> server to become available. Looking for an expected trace is harder,
> because none of the built-in conditions will do. Writing a
> <filecontains> condition may be better than scripting - except that it
> requires patching Ant's classes to use it (even in CVS HEAD, but that
> is hopefully going to change RSN).
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
Re: jython
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 27 May 2003, Sebastien Blanc <Se...@alcatel.com>
wrote:
> does anybody know of an equivalent of the javascript
> projName.getUserProperty / projName.createTask calls for jython
Without trying and being the Python neophyte I am, I'd expect them to
simply look the same as in JavaScript (without the semicolon at the
end).
All the objects exported to JavaScript should also be exported to
Jython.
> seems to me that waitFor is interesting to use when the condition is
> set internally to the ANT system with parallel although when it is
> an external condition (for instance looking up a log file for an
> expected trace) I don't find any solution.
It really depends on the "external" condition.
<waitfor> combined with a <socket> condition works great to wait for a
server to become available. Looking for an expected trace is harder,
because none of the built-in conditions will do. Writing a
<filecontains> condition may be better than scripting - except that it
requires patching Ant's classes to use it (even in CVS HEAD, but that
is hopefully going to change RSN).
Stefan
Re: jython
Posted by Sebastien Blanc <Se...@alcatel.com>.
Hi !
true, but it looks to me like the foreach is a loop on a finite number of
elements and cannot contain any conditional exit statement (asin the while).
for instance how to express (in pure ANT) the following: while (${property}!=
value) {do something } ?
seb.
Jacob Kjome wrote:
> You can use the ant-contrib project's <foreach> task which is, essentially,
> a looping <antcall>. It works quite nicely. No need to script.
>
> Jake
>
> At 10:18 PM 5/27/2003 -0500, you wrote:
> >Hello !
> >
> >does anybody know of an equivalent of the javascript
> >projName.getUserProperty / projName.createTask calls for jython (or
> >jptyhon) BSF ? the only link I found on jython <script> is the
> >following:
> >http://www.lonsteins.com/articles/jython-bsf.html
> >and it does not mention ANT integration.
> >
> >[btw I currently script becoz I can't find an ANT way to simulate a
> >while loop (the only way I would have think of, would have been if the
> >waitFor task would have supported a nested <antcall>); seems to me that
> >waitFor is interesting to use when the condition is set internally to
> >the ANT system with parallel although when it is an external condition
> >(for instance looking up a log file for an expected trace) I don't find
> >any solution.]
> >
> >thanx.
> >
> >seb.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
Re: jython
Posted by Jacob Kjome <ho...@visi.com>.
You can use the ant-contrib project's <foreach> task which is, essentially,
a looping <antcall>. It works quite nicely. No need to script.
Jake
At 10:18 PM 5/27/2003 -0500, you wrote:
>Hello !
>
>does anybody know of an equivalent of the javascript
>projName.getUserProperty / projName.createTask calls for jython (or
>jptyhon) BSF ? the only link I found on jython <script> is the
>following:
>http://www.lonsteins.com/articles/jython-bsf.html
>and it does not mention ANT integration.
>
>[btw I currently script becoz I can't find an ANT way to simulate a
>while loop (the only way I would have think of, would have been if the
>waitFor task would have supported a nested <antcall>); seems to me that
>waitFor is interesting to use when the condition is set internally to
>the ANT system with parallel although when it is an external condition
>(for instance looking up a log file for an expected trace) I don't find
>any solution.]
>
>thanx.
>
>seb.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org