ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Ant task to Count number of files in a directory
Date Fri, 26 Oct 2007 10:18:57 GMT

Hi, 


-----Original Message-----
From: Sujie [mailto:sujie_19@yahoo.com] 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message