开发者

Ant exec not executing commands in Hudson

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 开发者_C百科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>


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜