You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nguyen Duy Tho <th...@ulyssesvietnam.com.vn> on 2000/10/23 06:36:37 UTC
How to run a task with Java command in another command window?
Hi all,
I'm writing a task using org.apache.tools.ant.Java and setFork(true).
I'm using ant 1.2rc with Windows 2000.
There is my build.xml
...
<taskdef name="orionrun" classname="tools.ant.taskdefs.OrionRun"/>
...
</target>
<target name="orionrun">
<orionrun home="d:/orion" />
</target>
<target name="orion" depends="orionrun">
<mkdir dir="test" />
</target>
...
When I run 'ant orion' the task orionrun is running but I can't have hand to run orion task.
The 'execute()' method is here:
...
public void execute(){
...
Java orionServer = (Java)project.createTask("java");
orionServer.setTaskName( getTaskName());
orionServer.setFork("true");
orionServer.setClassname(orionMainClass);
orionServer.setDir(orionSystemHome.toString());
try {
orionServer.execute();
} catch (BuildException be) {
throw new BuildException("Execution of Orion failed");
}
...
The question: How must I do to run my 'orionrun' in a new command window so I can run the next task 'orion' ?
Thanks in advance for your help.
Nguyen Duy Tho