To get the root of your test target dir, I'd simply do something like:
String rootPath = "file://" +
MyTestClass.class.getClassLoader().getResource("").getFile()
+ "../";

Kalle

On Dec 19, 2007 10:40 PM, Insitu <[EMAIL PROTECTED]> wrote:

> HEllo,
> "Heinrich Nirschl" <[EMAIL PROTECTED]> writes:
> >
> > I seem to miss something, why does
> >
> > new File("test/resources/myImages")
> >
> > not work?
>
>
> Because you can never be sure that the current directory is the root
> directory of your project.
> You can define environment variables in the surefire plugin
> (<sysProperties>), so you could say something like:
>
> <sysProperties>
>  <property>
>  <name>test.resources.dir</name>
>  <value>${build.testOutputDirectory}</value>
>
> HTH,
> --
> Arnaud Bailly, PhD
> OQube - Software Engineering
> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to