ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: <script> and (j)ruby !?
Date Wed, 16 Aug 2006 08:21:19 GMT
On 8/15/06, Gilbert Rebhan <ant@schillbaer.de> wrote:
>
> Hi Peter,
>
> thanks for another bunch of helpful snippets !! :-)
>
> > I have found out how to use File in jruby, so
> > your example looks something like this:
>
> How did you get that, are you already experienced
> with (j)ruby ?


It was in the javaworld article:
http://www.javaworld.com/javaworld/jw-07-2006/jw-0717-ruby.html,
for the rest I have dabbled a little in ruby. I find it nicer than python
due to the lack of whitespace issues.



>
> >        <property name="ant.working.dir" location="."/>
> >        <script language="ruby"><![CDATA[
> >          def get_prop(name)
> >              ret = $project.getProperty(name)
> >              return ret ? ret : "null"
> >          end
>
> [...]
>
> One problem for me is, that i come from the java, javascript
> side and the ruby syntax is "non javaish".
> But on the other side, that's one point i like about ruby ;-)
>
> I've already searched the web for ruby+ant / jruby+ant, but
> didn't get much more as the examples in the ant manual.
> Do you have any further sources ?


I do not know of any specifically for jruby.
There are however a number of jython, javascript and beanshell
examples you could google for.


What would be nice would be scripting intergretion with IntrospectionHelper,
I think that groovy has something like that.

Peter


Regards, Gilbert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message