1

When I just run the snippet of the following from the command line in Windows XP, the Ant target executes as I expect. However, when I run it from Hudson (v1.398) it says the script completes fine, but it doesn't actually do anything. It does not run the AdminShellExec.exe at all. What am I doing wrong? I have tried this several different ways in the ant script too (without .txt file, do cmd.exe /C first, use arg line instead of redirector, etc...), but same issue.

 <target name="stop-model">
        <echo file="Script.txt">STOP model1 Force exit</echo>
            <exec executable="AdminShellExec.exe">
                <redirector input="Script.txt"></redirector>
            </exec>
    </target>
i850eggs
  • 55
  • 6

2 Answers2

0

Looks like you might have issues with the file paths. Try specifying the full path to all files.

e.g.

c:\myfolder\AdminShellExec.exe

c:\myfolder\Script.txt

sym3tri
  • 3,747
  • 1
  • 29
  • 25
0

You might want to set the basedir attribute in your build file

basedir - the base directory from which all path calculations are done. This attribute might be overridden by setting the "basedir" property beforehand. When this is done, it must be omitted in the project tag. If neither the attribute nor the property have been set, the parent directory of the buildfile will be used.

http://ant.apache.org/manual/using.html

manojlds
  • 290,304
  • 63
  • 469
  • 417