[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: ANT and exec

Hummm ... on further investigation

I left out some of the script for clarity but after takeing a closer look:

the script is closer to:

<exec dir="${library.filter.dir}" executable="myfile.bat">
<arg value="Path1;Path2"/>
<arg value="another_arg"
</exec>

I tried as stated earlier

<exec dir="${library.filter.dir}" executable="myfile.bat">
<arg value="&quot;Path1;Path2"&quot;/>
<arg value="-another_arg"
</exec>

It turns out the 1st arg is acutally parsing correctly now BUT ...

the 2nd arg is now being enclose in quotes as well on the command line???
This is resulting in a "Cannot parse switch" ..

very strange I think ... still looking for any help ..

Thanks

David







"David Trogdon" <david.trogdon@xxxxxxxxxxxxxxxxx> wrote in message
news:b2e6dt$dh4$1@xxxxxxxxxxxxxxxx
> ANT version 1.5
>
> Running a batch file useing exec
>
> the script shapes up similar to:
>
> <exec dir="${library.filter.dir}" executable="myfile.bat">
>  <arg value="Path1;Path2"/>
> </exec>
>
> NOTE that "Path1;Path2" is a single argument and cannot be seperated.
>
> inside myfile.bat:
>
> c:\jdk1.3.1_06\bin\java com.myjava.tool %1
>
>
> Running this from a DOS Command Prompt similar to:
>
> myfile "path1;path2"
>
> works, however I canot get this to run from the ANT script.
>
> As it is written above the command line parses as"
>
> myfile path1 path2
>
> resulting in path2 not being found
>
> I have tried
>
> <arg value="&quot;Path1;Path2&quot;"/>
>
> which also fails to parse correctly.
>
> Any ideas on how I can get this to work?
>
> Thanks
>
> David
>
>
>
>
>
>