ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Open and read file with ant and then copy
Date Mon, 10 Sep 2007 13:03:13 GMT
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:info@mitjab.com] 
>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:Gilbert.Rebhan@huk-coburg.de] 
>> 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 =
>> 
>> &lt;script language=&quot;ruby&quot;&gt;
>> &lt;![CDATA[
>>      
>> require 'fileutils'
>> File.open('C:WKSEclipse322WEB_neucopytest.txt', 
>&quot;r&quot;).each do
>|line|
>>   arr=line.split(' ')
>>   FileUtils.mkdir_p(File.dirname(arr[1]),:verbose=&gt;true)
>>   FileUtils.cp(arr[0],arr[1],:verbose=&gt;true)
>> end
>> ]]&gt;
>> &lt;/script&gt;
>> 
>> instead of =
>>       
>> require 'fileutils'
>>      
>> File.open('C:WKSEclipse322testcopytest.txt', 
>&quot;r&quot;).each do |line|
>>   FileUtils.mkdir_p(File.dirname(line.split(' 
>')[1]),:verbose=&gt;true)
>>   FileUtils.cp(line.split(' ')[0],line.split(' 
>')[1],:verbose=&gt;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: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>> 
>> 
>
>________________________________________________
>Message sent using UebiMiau 2.7.10
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message