On 2012-01-11, xsli2 wrote: > <echo message="sub base dir=${basedir}" /> > <target name="MyTest"> > <junit> > <classpath refid="project.classpath" /> > <formatter type="brief" usefile="false" /> > <test name="A.B.C.MyTest" /> > </junit> > </target> > Inside MyTest.java, I added this print out: > final String currentDir = new File(".").getAbsolutePath(); > System.out.println("currentDir=" + currentDir);
Ant's basedir and the running Java process' current working directory are not the same thing. When you use an <ant> task you only change the basedir but not the current working directory. To do that, you'd have to fork the Java/JUnit process so it is running in a fresh Java VM. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org