Hi,
I am trying to use the <exec> task to run a perl script on windows. I need to source the environment using a .bat file first so I am running the two commands in the same shell.
The code I am trying to use is the following:
<exec executable="cmd" dir="${DMTA}" failonerror="false">
<arg line='/c "setenvs.bat && ${PERL} DMTA_Driver.pl -v"'/>
</exec>
My problem is with the <arg line=...
When I try to run this it throws the following error because of the &'s:
The entity name must immediately follow the '&' in the entity reference.
I know & is used to import files prior to 1.6 so I take it that ANT is throwing the error because of this. Do I need to escape the &'s? I tried using \'s and using the hexcode for & but to no avail.
Any ideas would be gratefully accepted.
Thanks,
John
I am trying to use the <exec> task to run a perl script on windows. I need to source the environment using a .bat file first so I am running the two commands in the same shell.
The code I am trying to use is the following:
<exec executable="cmd" dir="${DMTA}" failonerror="false">
<arg line='/c "setenvs.bat && ${PERL} DMTA_Driver.pl -v"'/>
</exec>
My problem is with the <arg line=...
When I try to run this it throws the following error because of the &'s:
The entity name must immediately follow the '&' in the entity reference.
I know & is used to import files prior to 1.6 so I take it that ANT is throwing the error because of this. Do I need to escape the &'s? I tried using \'s and using the hexcode for & but to no avail.
Any ideas would be gratefully accepted.
Thanks,
John