ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nguyen Duy Tho" <th...@ulyssesvietnam.com.vn>
Subject How to run a task with Java command in another command window?
Date Mon, 23 Oct 2000 04:36:37 GMT
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





Mime
View raw message