http://ant.apache.org/manual/install.html#librarydependencies * jruby.jar * bsf.jar (or Java6) * commons-logging.jar
Jan >-----Ursprüngliche Nachricht----- >Von: Mitja B. [mailto:[EMAIL PROTECTED] >Gesendet: Montag, 10. September 2007 14:53 >An: Ant Users List >Betreff: RE: Open and read file with ant and then copy > >This idea is also very good but i have problem. > >java.lang.NoClassDefFoundError: org/apache/bsf/BSFException" error > >which library do i need for running ruby? > >Thx > > >--------- Original Message -------- >From: Ant Users List <user@ant.apache.org> >To: Ant Users List <user@ant.apache.org> >Subject: RE: Open and read file with ant and then copy >Date: 10/09/07 14:44 > >> >> >> Hi, >> >> -----Original Message----- >> From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] >> Sent: Monday, September 10, 2007 12:49 PM >> To: Ant Users List >> Subject: RE: Open and read file with ant and then copy >> >> Oops, use = >> >> <script language="ruby"> >> <![CDATA[ >> >> require 'fileutils' >> File.open('C:WKSEclipse322WEB_neucopytest.txt', >"r").each do >|line| >> arr=line.split(' ') >> FileUtils.mkdir_p(File.dirname(arr[1]),:verbose=>true) >> FileUtils.cp(arr[0],arr[1],:verbose=>true) >> end >> ]]> >> </script> >> >> instead of = >> >> require 'fileutils' >> >> File.open('C:WKSEclipse322testcopytest.txt', >"r").each do |line| >> FileUtils.mkdir_p(File.dirname(line.split(' >')[1]),:verbose=>true) >> FileUtils.cp(line.split(' ')[0],line.split(' >')[1],:verbose=>true) >> end >> >> so the method line.split() is only called once >> If you need another separator, i.e. # just use line.split('#') >> >> Regards, Gilbert >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > >________________________________________________ >Message sent using UebiMiau 2.7.10 > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]