Hi Wendy,

Thanks for the information.  I will try this out since it appears to be what
I was looking for.

Cheers,
-Lyndon-

On 6/5/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:

On 6/5/06, Lyndon Washington <[EMAIL PROTECTED]> wrote:

> I have a unit test that was setup in the old ANT build to load resources
> using a relative path.  I have put the resource that is being retrieved
in
> the projects 'test/resources/conf' folder.  How would I reference the
file,
> where previously I used 'conf/foo.xml'?
>
> I guess I was assuming that there would be a system propery that I could
> use.  Another snippet of info is that this project is part of a large
pom
> heirarchy, so the test could be run from the parent or from the actual
> project location.

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

Surefire sets a 'basedir' system property, which you can retrieve with:
   System.getProperty("basedir")

It also sets 'localRepository', which can be useful for locating
artifacts (such as war files to deploy with Cargo.)

In addition, you can pass in your own system properties in the
<plugin>/<configuration> section.

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to