ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nordlund <>
Subject property dir needed in java and junit tasks
Date Tue, 19 Sep 2000 09:14:23 GMT

Maybe I haven't understood this issue fully, so my apologies if
this problem could be solved in an other way.

I feel a need for a "dir" attribute to both the java task and junit
The "dir" attribute should work approximately as it does for the Exec

"dir" is supposed to be the directory where the 
java class should be executed.

The reason I think this is needed, is that sometimes paths
to files are relative to where the class is executed and you
don't have control over that yourself.
E.g. You read a file which contains a path to another file.
Or is there any other way to solve this problem?

Below follows a more extensive example:
I have an xml-file which have a dtd.
(A file that someone else has generated, so I have no control 
of how the content looks like.)

Something like this.

The file box.xml contains:
<!DOCTYPE doc SYSTEM "box.dtd">

Now, if my program which contains an xml-parser
is supposed to find "box.dtd" which
resides in the same dir as box.xml, then the program must
be executed in the same dir as box.xml and box.dtd resides
otherwise box.dtd will not be found.


View raw message