Hi, 

-----Original Message-----
From: Sujie [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 26, 2007 12:09 PM
To: user@ant.apache.org
Subject: RE: Ant task to Count number of files in a directory

/*
I get the following error when trying to using ruby as a script
language. 
"unable to load a script engine manager (org.apache.bsf.BSFManager or
javax.script.ScriptEngineManager)"
Do i need to import something else?

The resource count is not working for me. It always returns 1
irrespective
of number of files in the directory.
<resourcecount property="uninstall-files">
  <filelist dir="${installDir}/uninstall" files="*.jar" />
</resourcecount>
<echo message="count of files ${uninstall-files}" />
*/

you need =

1. the BeanScriptingFramework (bsf.jar) as for
    all other scripting languages (groovy,javascript,
    beanshell ...), get it here =
    http://jakarta.apache.org/bsf/

2. http://dist.codehaus.org/jruby/jruby-bin-1.0.1.zip, the contained
    jruby.jar  will be sufficient for your code snippet, but if you need
    more ruby libraries then use 
   http://dist.codehaus.org/jruby/jruby-complete-1.0.1.jar
   then you could use those libraries with  'require ...' (like import
in java)
   if in doubt use the complete jar

simply put those jars into %ANT_HOME%/lib and you're ready
to go

Regards, Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to