Peter Reilly wrote:
> On 10/27/06, Steve Loughran <stevel@apache.org> wrote:
>> Jan.Materne@rzf.fin-nrw.de wrote:
>> >> build.bat is called by the buildApp.xml with :
>> >> <exec dir="${basedir}" executable="${basedir}/build.bat"
>> >> failifexecutionfails="false" failonerror="false"></exec>
>> >
>> >
>> > bat files are not executable, use cmd.exe instead and the bat as
>> > argument.
>> > See FAQ and (1.7) manual.
>>
>> I've been thinking about this. Why dont we have Exec complain if we find
>> a .bat or .cmd at the end of an executable on windows?
>
> Because one can execute some bat files directly:
> hello.bat
> -----------
> echo "Hello"
> ------------
> build.xml
> ------------
> <project><exec executable="hello.bat"/></project>
> ------------
> Result:
> Buildfile: build.xml
> [exec] C:\>echo "Hello"
> [exec] "Hello"
> BUILD SUCCESSFUL
>
> That is why I said "cannot in general by executed directly"
> (typo included!)
> I do not know the (as usual in windows land) crazy rules on using .bat
> files
> directly.
It probably depends on how ant chooses to run the program, and how the
JVM works underneath.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|