ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Jeffriess <Steven.Jeffri...@motorola.com>
Subject Re: Cannot run Windows shell commands like start from ant : Please help me.
Date Fri, 24 May 2002 02:22:47 GMT
think you'll find that start is not an executable.
haven't tried it under ant but you should be able to achieve the same with
"cmd.exe" and the the args "/C" & "start"

hth
steve

Viraj Purang wrote:

> Hi,
>    I tried to run just "start" command using the "exec" task.
> It does not work, however , all other batch scripts run just fine for me.
>
> I am doing this in order to run the weblogic server , and get the control
> back even as the server runs off the start window, so that I can run the
> junit test library ...
>
> -------------------------------------
> ant -debug log shows ...
> ---------------------------------
> run_windows:
> Property ${env.PATH} has not been set
>      [exec] Current OS is Windows 2000
>      [exec] start C:\depot\cajun\knex\build\bin\runWebLogic.cmd
>      [exec] Output redirected to C:\weblogic.log
>      [exec] Setting environment variable:
> WL_HOME=C:\depot\cajun\bea\weblogic70
> \server
>      [exec] Setting environment variable: PATH=${env.PATH}
> Execute:Java13CommandLauncher: start
> C:\depot\cajun\knex\build\bin\runWebLogic.
> md
>
> BUILD FAILED
>
> C:\build.xml:338: Execute failed: java.io.IOException: CreateProcess: start
> C:\
> epot\cajun\knex\build\bin\runWebLogic.cmd error=2
>         at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:281)
>         at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:177)
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120
>
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
>         at org.apache.tools.ant.Main.runBuild(Main.java:454)
>         at org.apache.tools.ant.Main.start(Main.java:153)
>         at org.apache.tools.ant.Main.main(Main.java:176)
> --- Nested Exception ---
> java.io.IOException: CreateProcess: start
> C:\depot\cajun\knex\build\bin\runWebL
> gic.cmd error=2
>         at java.lang.Win32Process.create(Native Method)
>         at java.lang.Win32Process.<init>(Win32Process.java:61)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(Runtime.java:546)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
> org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exe
> ute.java:564)
>         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:384)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:250)
>         at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:279)
>         at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:177)
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120
>
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
>         at org.apache.tools.ant.Main.runBuild(Main.java:454)
>         at org.apache.tools.ant.Main.start(Main.java:153)
>         at org.apache.tools.ant.Main.main(Main.java:176)
>
> Total time: 1 second
>
> Regards,
> Viraj Purang
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message