ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject scriptdef attributes with parallel-task & jruby 1.5.1
Date Fri, 20 Aug 2010 08:40:55 GMT


i've just upgraded to ant 1.8.1 due to the threading fix for
scriptdef attributes
It works for beanshell scripts and also for jruby 1.4.1

I've now also upgraded to jruby-complete-1.5.1 and now I have problems
accessing the attributes when called from <parallel>. Example

  <target name="defaultscript">
     <parallel threadCount="4">
       <jrubytest testit="1" />
       <jrubytest testit="2" />
       <jrubytest testit="3" />
       <jrubytest testit="4" />
   <scriptdef name="jrubytest" language="ruby">
     <attribute name="testit" />
       puts "attribute testit  " + $attributes.get("testit")
Here $attributes isn't defined and I get an error

javax.script.ScriptException: org.jruby.exceptions.RaiseException:  
undefined method `get' for nil:NilClass

The same script works when threadCount="1" or when using jruby-complete-1.4.1


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message