java.io.IOException:无法运行程序";ant";

java.io.IOException:无法运行程序";ant";,java,ant,build,hudson,jobs,Java,Ant,Build,Hudson,Jobs,我在哈德逊做一份工作。 我从Hudson主服务器构建此作业,但该作业是在Hudson Linux节点中构建的。 结果是: Started by user builder Building remotely on Linux-Node Updating http: // Server/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false At revision 529 Updating http:

我在哈德逊做一份工作。 我从Hudson主服务器构建此作业,但该作业是在Hudson Linux节点中构建的。 结果是:

Started by user builder
Building remotely on Linux-Node
Updating http: // Server/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
At revision 529
Updating http: // Server/branches revision: 17-may-2013 16:01:46 depth:infinity ignoreExternals: false
At revision 529
no change for http: // Server/branches since the previous build
no change for http: // Server/branches since the previous build
No emails were triggered.
[bt] $ ant -file build.xml -DSUBSYSTEM=ALL -DTARGET=makeBuild -DCRLIST= -DOWNER= -DbuildTool.patch.release=$RELEASE -DbuildTool.system=$SYSTEM -DbuildTool.patch.type=$PATCH_TYPE -DbuildTool.subsystem=ALL -DbuildTool.buildRules=pkgBuild -DbuildTool.dynamicView=$WORKSPACE/ALL -DbuildTool.compilationRules=compile -DbuildTool.patch.name=$PATCH_NAME makeBuild
FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?
java.io.IOException: Cannot run program "ant" (in directory "/hudson/buildTool/src/bt"): error=2, No existe el fichero o el directorio
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at hudson.Proc$LocalProc.<init>(Proc.java:192)
at hudson.Proc$LocalProc.<init>(Proc.java:164)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
at hudson.Launcher$ProcStarter.start(Launcher.java:274)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:794)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:768)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: error=2, No existe el fichero o el directorio
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 15 more
由用户生成器启动
在Linux节点上远程构建
更新http://Server/branchs修订版:2013年5月17日16:01:46深度:无穷大忽略外部:false
第529次修订
更新http://Server/branchs修订版:2013年5月17日16:01:46深度:无穷大忽略外部:false
第529次修订
自上一次生成以来,没有对http://Server/branchs进行任何更改
自上一次生成以来,没有对http://Server/branchs进行任何更改
没有触发任何电子邮件。
[英国电信]$ant-file build.xml-DSUBSYSTEM=ALL-DTARGET=makeBuild-DCRLIST=-DOWNER=-DbuildTool.patch.release=$release-DbuildTool.system=$system-DbuildTool.patch.type=$patch\u type-DbuildTool.subsystem=ALL-DbuildTool.buildRules=pkgBuild-DbuildTool.dynamicView=$WORKSPACE/ALL-DbuildTool.compliationrules=compile-DbuildTool.patch.name=$patch\u name建造
致命:命令执行失败。可能需要配置作业以选择一个Ant安装?
java.io.IOException:无法运行程序“ant”(在目录“/hudson/buildTool/src/bt”中):错误=2,不存在el-fichero el-directorio
位于java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
在hudson.Proc$LocalProc.(Proc.java:192)
在hudson.Proc$LocalProc.(Proc.java:164)
位于hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
位于hudson.Launcher$ProcStarter.start(Launcher.java:274)
在hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:794)
在hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:768)
在hudson.remoting.UserRequest.perform(UserRequest.java:114)
在hudson.remoting.UserRequest.perform(UserRequest.java:48)
在hudson.remoting.Request$2.run(Request.java:283)
位于java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
位于java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
在java.util.concurrent.FutureTask.run(FutureTask.java:166)中
位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
运行(Thread.java:722)
原因:java.io.IOException:错误=2,不存在el FICHRO el directorio
位于java.lang.UNIXProcess.forkAndExec(本机方法)
位于java.lang.UNIXProcess(UNIXProcess.java:135)
在java.lang.ProcessImpl.start(ProcessImpl.java:130)
位于java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 还有15个
你知道这个问题吗


感谢并问候

使用绝对路径引用可执行文件是一种更安全的做法。用
${ant\u HOME}/bin/ant
代替ant。确保变量定义正确。

可能是您在项目配置中选择了默认Ant版本。您应该在下拉列表中选择特定的ant版本。
当然可以在

中找到,Ant已安装并且在类路径中?您检查过这个吗?是的,我读过,但我没有找到解决办法。Ant安装在这里:/usr/apache-Ant/apache-Ant-1.8.2/,而$PATH是:/usr/apache-Ant/apache-Ant-1.8.2/bin