>BUILD FAILE:
>c:\projekti\test\build.xml:19: The following error occurred while
executing
>this line: C:\projekti\test\build.xml:23: Warning: could not find file
c:\Projekti\test\${from} to copy
>
><target name="opencopy">
><taskdef resource="net/sf/antcontrib/antlib.xml"/>

= add ac-task 

><loadfile property="allfiles" srcFile="c:/Projekti/test/message.txt"/>

= ${allfiles} contains the whole file

><ac:for list="${allfiles}" param="line">

= iterate over each line (implizit delimiter="${line.separator}") and
store each line in @{line}

><ac:sequential>
><ac:propertyregex property="from" input="@{srcFile}" regexp="(.*)=(.*)"
select="\1" override="true"/>
><ac:propertyregex property="to" input="@{srcFile}" regexp="(.*)=(.*)"
select="\2" override="true"/>

= @{srcFile} is not set, therefore this does nothing useful; you have to
use @{line} instead
= splits the line on the '=' delimiter and stores the parts into ${from}
and ${to}

><copy file="${from}" tofile="${to}"/>

= should copy ${from} to ${to}



Jan

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

Reply via email to