ant-dev mailing list archives

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

Hi,

i've just upgraded to ant 1.8.1 due to the threading fix for
scriptdef attributes
    https://issues.apache.org/bugzilla/show_bug.cgi?id=41602
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" />
     </parallel>
   </target>
   <scriptdef name="jrubytest" language="ruby">
     <attribute name="testit" />
     <![CDATA[
       puts "attribute testit  " + $attributes.get("testit")
     ]]>
   </scriptdef>
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

Stefan







---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message