ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oisin Kim" <oisin....@aurium.net>
Subject RE: Run time commands
Date Wed, 17 Apr 2002 12:06:11 GMT
Hi again,
I've tried using the exec aommand but the result is exactly the same.
Commandline input is not possible.
Any ideas are welcome!

Oisin

Heres the new test task:
<target name="test" depends="module-test">
    <exec dir="${ant.project.name}" executable="java">
        <env key="PATH" path="${aurium.classpath}"/>
        <arg value="net.aurium.harness.Harness"/>
        <arg value="aurium.properties"/>
        <arg value="tests.txt"/>
        <arg value="-m"/>
    </exec>
</target>

I've also tried:

<target name="test" depends="module-test">
    <exec dir="${ant.project.name}" executable="java.exe" os="Windows
2000">
        <env key="PATH" path="${aurium.classpath}"/>
        <arg value="net.aurium.harness.Harness"/>
        <arg value="aurium.properties"/>
        <arg value="tests.txt"/>
        <arg value="-m"/>
    </exec>
</target>

-----Original Message-----
From: Oisin Kim [mailto:oisin.kim@aurium.net] 
Sent: 17 April 2002 12:29
To: 'Ant Users List'
Subject: RE: Run time commands


Hi Stefan,

Thanks for the reply, 

I'm using the <java..../> tag to call run a class which then reads reads
some properties files and runs some other java classe(s) using
reflection, not the exec command.  I have seen the <exec> command but
thought it wasn't as clean a solution as using <java>.

The excerpt from the ant XML file is:

<target name="test" depends="module-test">
    <java classname="net.aurium.harness.Harness"
dir="${ant.project.name}" fork="true">      
        <classpath refid="aurium.classpath"/>
        <arg value="aurium.properties"/>
        <arg value="tests.txt"/>
        <arg value="-m"/>
    </java>
</target>

The module-test simply builds the classes the net.aurium.Harness will
run using reflection.

As I mentioned to Kevin off-list, the command line question is actually
a simplification of the real problem, but I'd hope I wan't too wrong
when I made the simplification, as I think they're related.  The thing I
didn't mention is that I'm also using JNI to receive native Event calls
from a MFC/C++ application, the MFC application is frozen as I start it
from one of the relfected classes and it seems that Ant won't allow me
to use runtime data input to the running application from commandline or
from this MFC app.

Apologies if I've misled you with my original question, I was hoping
someone would know a solution to the simpler version I gave first and I
could work the rest out myself!

Thanks again for the reply,

Oisin



-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: 17 April 2002 10:52
To: ant-user@jakarta.apache.org
Subject: Re: Run time commands


On Wed, 17 Apr 2002, Oisin Kim <oisin.kim@aurium.net> wrote:

> I know I can pass inputs using an argument <arg value="xxx"/> but I
> need to input data base on the output from the program I'm running!

I assume you run that command via <exec>, yes?

If so, you can set a property to the output of your command (<exec>'s
outputpropoperty attribute) and later use that property inside <arg>.

Stefan

--
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>


--
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