db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Test failure in api20
Date Fri, 08 Jun 2007 02:14:59 GMT
Hi Matthew,

On Jun 7, 2007, at 11:53 AM, Matthew T. Adams wrote:

> The second one, where the unit tests fail when maven is run from  
> the trunk,
> is because the basedir is not getting set correctly.  Does anyone  
> have any
> ideas on how to fix that one?

I'm working from memory (usually bad but there you go). The code that  
does getResourceAsStream uses the current working directory if the  
resource name doesn't begin with "/". This is different for each  
working directory from which you run the code.

The solution is to get the project root $ROOT from a system property  
and prepend $ROOT/api2 to the path name.

Just a guess

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message