| Author |
ant script not working
|
Pradeep Kumar
Ranch Hand
Joined: Sep 11, 2007
Posts: 77
|
|
Hi, I have a batch file in the current base directory. I tried running the batch file using the following command. <?xml version="1.0" encoding="UTF-8"?> <project name="batchFile" default="exec" basedir="."> <target name="exec"> <echo>start execution</echo> <exec dir="${basedir}" executable="batch" os="Windows NT"> <arg line="stop_copy_start"/> </exec> </target> </project> The echo is getting executed but there is no warning error or any intimation but the Build successfull message is getting displayed. Can someone tell me how to run the batch file. THe os is windows xp service pack 2. Thanks and regards, Pradeep Kumar
|
SCJP 1.6
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Did you check the value of the "os.name" property?
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Pradeep Kumar
Ranch Hand
Joined: Sep 11, 2007
Posts: 77
|
|
|
How and where to test the os.name property.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Just add a <echo>${os.name}</echo> to your script. The shown value is the one you should use for the os attribute of the exec task. Or perhaps you should use the osfamily attribute instead.
|
 |
 |
|
|
subject: ant script not working
|
|
|