ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dudouet eric <eric.dudo...@actoll.com>
Subject running a new cmd process without stopping ant
Date Wed, 25 Apr 2001 10:13:58 GMT
Hi all !
I'm working with ant v1.3 under Win NT SP5 and JDK 1.3

I try to launch a cmd process in a new dos window from my build.xml file
without stopping the execution of ant.
That is : execute the dos "start"command with a .bat file in arg.
I try : (test.bat is in my basedir)
  <target name="test3" depends="deploy">
    <exec executable="cmd.exe">
      <arg line="/c start test.bat"/>
    </exec>
  </target>
which works well, but ant stops and waits for the new cmd window to be
closed

When I try :

  <target name="test2" depends="deploy">
    <execon executable="start">
      <fileset dir="." includes="test.bat"/>
    </execon>
  </target>

I got the nested exception :

Execute failed: java.io.IOException: CreateProcess: start
E:\test\run.bat error=2
--- Nested Exception ---
java.io.IOException: CreateProcess: start E:\test\run.bat error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:509)

        at
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
        at
org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:167)
        at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)

        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

I understand this feature could seem strange, because it breaks the
linear execution of the compilation process.
But I want to do that.
Is there any way to do that ?
Could somebody help me ?

Thanks

--
DUDOUET Eric
ACTOLL
19 Avenue du GRANIER
38240 MEYLAN
Tel MEYLAN:   04-76-18-18-26
Tel Portable: 06-72-38-87-12



Mime
View raw message