ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tsm...@netscape.net (Thomas SMETS)
Subject RE: Passing file list to a java program
Date Tue, 30 Sep 2003 09:51:17 GMT

if I change the 
   <arg path="${businessrules}"/> 
to 
   <arg path="${businessrules}"/>

I get :
     [java]  0 : C:\Program
     [java]  1 : Files\IBM\Application
     [java]  2 : Developer\workspace\UseCase1\part
     [java]  3 : A\UC1_CreateDSLAM_24-9-03-7pm.ilr
     [java]  4 : C:\Program
     [java]  5 : Files\IBM\Application
     [java]  6 : Developer\workspace\UseCase1\part
     [java]  7 : A\UC1_CreateDSLAM_25-9-03-10pm.ilr
     [java]  8 : C:\Program
     [java]  9 : Files\IBM\Application
     [java]  10 : Developer\workspace\UseCase1\part
     [java]  11 : B\UC1_CreateCard_CBRForCT-24-9-03-11pm.ilr

but then the adding of &quot; here in there does not solve the problem...
If I change to: 
<pathconvert pathsep="&quot; " property="businessrules" refid="businessrules.files"/>
I get :
     [java]  0 : C:\Program
     [java]  1 : Files\IBM\Application
     [java]  2 : Developer\workspace\UseCase1\part
     [java]  3 : A\UC1_CreateDSLAM_24-9-03-7pm.ilr C:\Program Files\IBM\Application Developer\workspace\UseCase1\part
A\
UC1_CreateDSLAM_25-9-03-10pm.ilr
     [java]  4 : C:\Program
     [java]  5 : Files\IBM\Application
     [java]  6 : Developer\workspace\UseCase1\part
     [java]  7 : B\UC1_CreateCard_CBRForCT-24-9-03-11pm.ilr

or 
        <pathconvert pathsep="&quot; " property="businessrules" refid="businessrules.files"/>
    
        <java classname="${Test.Main}">
            <arg line="&quot;${businessrules}&quot;"/> 
            <classpath>
                <pathelement path="${build.dir}" />
            </classpath>
        </java>

I get :
     [java]  0 : C:\Program Files\IBM\Application Developer\workspace\UseCase1\part A\UC1_CreateDSLAM_24-9-03-7pm.ilr
     [java]  1 : C:\Program
     [java]  2 : Files\IBM\Application
     [java]  3 : Developer\workspace\UseCase1\part
     [java]  4 : A\UC1_CreateDSLAM_25-9-03-10pm.ilr C:\Program Files\IBM\Application Developer\workspace\UseCase1\part
B
\UC1_CreateCard_CBRForCT-24-9-03-11pm.ilr


Not perfect yet ! ! !

Any other suggestion ? ? ? 

\T,



tsmets@netscape.net (Thomas SMETS) wrote:

>
>Was Netscape mail faster I would have respond sooner too :-))
>YES I tried & retried (after you asked)...
>
><fileset dir="${basedir}" id="businessrules.files">
>   <include name="**/*.ilr"/>
></fileset>
>      
><pathconvert pathsep=" " 
>             property="businessrules" 
>             refid="businessrules.files"/>
>    
><java classname="${Test.Main}">
>   <arg path="${businessrules}"/> 
>   <classpath>
>      <pathelement path="${build.dir}" />
>   </classpath>
></java>
>
>returns me :
>     [echo] Test
>     [java]  0 : C:\Program Files\IBM\Application Developer\workspace\UseCase1\part
A\UC1_CreateDSLAM_24-9-03-7pm.ilr C
>C:\Program Files\IBM\Application Developer\workspace\UseCase1\part A\UC1_CreateDSLAM_25-9-03-10pm.ilr
C;C:\Program File
>\IBM\Application Developer\workspace\UseCase1\part B\UC1_CreateCard_CBRForCT-24-9-03-11pm.ilr
>
>:((
>
>Any other idea ?
>OS is W2K !
>
>\T,
>
>
>
>Jan.Materne@rzf.fin-nrw.de wrote:
>
>>Have you tried <pathconvert pathsep=" "/> ?
>>
>>Jan
>>
>>> -----Original Message-----
>>> From: tsmets@netscape.net [mailto:tsmets@netscape.net]
>>> Sent: Tuesday, September 30, 2003 11:27 AM
>>> To: user@ant.apache.org
>>> Subject: Passing file list to a java program 
>>> 
>>> 
>>> Hi,
>>> In our automated build we need to run a script from a third 
>>> party which works in the form :
>>> 
>>>  java -cp ${classpath} file_to_process_1 \
>>>                        file_to_process_2 \
>>>                        file_to_process_3 \
>>>                        file_to_process_4 \
>>>                        file_to_process_5 \
>>>                        file_to_process_6
>>> 
>>> I, of course, have NO access to the source code, but I'd like 
>>> to automated this task. I have tried undreds of <path> / 
>>> FileSets / ...
>>> 
>>> This is the closeth I have come to :
>>>         <fileset id="my.file.set" dir="${basedir}">     
>>>                 <include name="**/*.ilr" />
>>>                 <exclude name="**/*.txt" />
>>>         </fileset>
>>>         <pathconvert pathsep="&quot; " 
>>>                      property="my.file.list" 
>>>                      refid="my.file.set">       
>>>                 <map from="${basedir}"
>>>                      to="${basedir}"/>  
>>>         </pathconvert>
>>> 
>>> but I still get the files as ONE big argument instead of a 
>>> list which could successfully be used as in : 
>>> 
>>> 
>>>         public static final void main (String[] args)
>>>         {       
>>>                 for (int i = 0; i < args.length; ++i)        

>>>               System.out.println (" " + i + " : " + args[i] );
>>>         }
>>> 
>>> 
>>> 
>>> Thank you for any help !
>>> 
>>> \T,
>>> 
>>> 
>>> 
>>> -- 
>>>  
>>> Thomas SMETS 
>>> rue J. Wytsmanstraat 62
>>> 1050 Brussels
>>> 
>>> 
>>> __________________________________________________________________
>>> McAfee VirusScan Online from the Netscape Network.
>>> Comprehensive protection for your entire computer. Get your 
>>> free trial today!
>>> http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro
>>mo=393397
>>
>>Get AOL Instant Messenger 5.1 free of charge.  Download Now!
>>http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>
>
>-- 
> 
>Thomas SMETS 
>rue J. Wytsmanstraat 62
>1050 Brussels
>
>
>__________________________________________________________________
>McAfee VirusScan Online from the Netscape Network.
>Comprehensive protection for your entire computer. Get your free trial today!
>http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
>Get AOL Instant Messenger 5.1 free of charge.  Download Now!
>http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
 
Thomas SMETS 
rue J. Wytsmanstraat 62
1050 Brussels


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

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


Mime
View raw message