}
-Original Message
From: Lyndon Washington [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 07, 2006 8:43 PM
To: Maven Users List
Subject: Re: Referencing Files from a Unit Test
Wendy,
What I have noticed is that if I go into the sub projects
On 6/7/06, Lyndon Washington <[EMAIL PROTECTED]> wrote:
What I have noticed is that if I go into the sub projects directory and run
'mvn test', the relative paths that are in the tests resolve perfectly.
When I run the 'mvn test' from the parent project path, then the relative
paths cannot be fo
Wendy,
What I have noticed is that if I go into the sub projects directory and run
'mvn test', the relative paths that are in the tests resolve perfectly.
When I run the 'mvn test' from the parent project path, then the relative
paths cannot be found. Will the use of the "basedir" property resol
+ filename);
String absoluteFilename = url.getFile();
Regards,
Jimisola
--
View this message in context:
http://www.nabble.com/Referencing-Files-from-a-Unit-Test-t1737229.html#a4760075
Sent from the Maven - Users forum at
FWIW, I have a trick that I use in my unit tests to retrieve
java.io.Filereferences to resources like that...the nice thing is that
it works both in
the IDE and from a Maven build.
private File getFile( String resourceName )
{
ClassLoader cloader = Thread.currentThread().getContextClassLoader(
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 loa
looking for:
this.getClass().getClassLoader().getResourceAsStream(...
http://marc.theaimsgroup.com/?l=turbine-maven-user&m=114917325827653&w=2
- Original Message -
From: "Lyndon Washington" <[EMAIL PROTECTED]>
To:
Sent: Monday, June 05, 2006 8:24 PM
Subject:
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
Monday, June 05, 2006 8:24 PM
Subject: Referencing Files from a Unit Test
Hi,
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 refere
Hi,
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
10 matches
Mail list logo