Jenkins - java.io.IOException:无法运行程序 - 错误= 2,没有这样的文件或目录

时间:2015-02-25 17:23:26

标签: shell ant jenkins hudson

我正在尝试与安装在Linux上的Jenkins进行持续集成,并且我在centos机器上运行当前的工作。 在构建一个ant文件时,我收到了这个错误。

/devel/ccstore/builder/jenkins2/workspace/ersp_build/builder_ersp_build/vobs/ersp/scripts"): java.io.IOException: error=2, No such file or directory
17:23:51    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
17:23:51    at java.lang.Runtime.exec(Runtime.java:593)
17:23:51    at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
17:23:51    at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
17:23:51    at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
17:23:51    at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
17:23:51    at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
17:23:51    at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
17:23:51    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
17:23:51    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
17:23:51    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:23:51    at java.lang.reflect.Method.invoke(Method.java:597)
17:23:51    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
17:23:51    at org.apache.tools.ant.Task.perform(Task.java:348)
17:23:51    at org.apache.tools.ant.Target.execute(Target.java:392)
17:23:51    at org.apache.tools.ant.Target.performTasks(Target.java:413)
17:23:51    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
17:23:51    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
17:23:51    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
17:23:51    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
17:23:51    at org.apache.tools.ant.Main.runBuild(Main.java:811)
17:23:51    at org.apache.tools.ant.Main.startAnt(Main.java:217)
17:23:51    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
17:23:51    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
17:23:51 Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
17:23:51    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
17:23:51    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
17:23:51    at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
17:23:51    ... 23 more

这是XML文件的相关部分:

target name="mkbaseline" depends="incrementBuildNumber">
        <tstamp>
            <format property="start.mkbl" pattern="MM/dd/yyyy hh:mm aa" unit="hour" />
            <format property="baseline.time" pattern="dd-MMM-yyyy_hh.mm" unit="hour" />
        </tstamp>
        <echo>Dropping Baseline on ${viewtag} at ${start.mkbl} </echo>
        <echo>Executing: ${scriptsPath}/create-baseline.sh ${baseline.time} </echo>
        <exec dir="${scriptsPath}" executable="${scriptsPath}/create-baseline.sh" resultproperty="mkbl_error_code" >
            <arg line="${baseline.time}" />
        </exec>
        <fail>
            <condition>
                <not>
                    <equals arg1="${mkbl_error_code}" arg2="0" />
                </not>
            </condition>
        </fail>
    </target>

我对可执行的bash脚本没有任何权限问题,我在构建中的前一个target已成功执行,该目标执行了另一个具有相同权限的bash脚本:-r-xr-xr-x

0 个答案:

没有答案