You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Catteau <oc...@gmail.com> on 2008/01/10 17:39:52 UTC

[Surefire2.3] Resources classpath problem

Hello,

We have a few problems with the classpath used by surefire. Some tests fail
randomly due to the order of the classpath managed by Surefire.
During the execution of unit tests, it seems that the classpath used by
maven differs from the classpath used by my IDE (IntelliJ).
In IntelliJ, resources are loaded with the following order :
/target/test-classes
/target/classes
.../aLib.jar
.../anotherLib.jar
...

But, by using maven2, the order is :
...
.../aLib.jar
/target/test-classes
/target/classes
.../anotherLib.jar
...

Our projects use Surefire2.3.
Is it possible to patch surefire to get a correct classpath (such as
IntelliJ) ? Has this bug been fixed with maven2.0.8 ?


Thanks.

Regards,
Alexandre Bunod and Olivier Catteau

Re: [Surefire2.3] Resources classpath problem

Posted by Cory Prowse <co...@ibsglobalweb.com>.
Yes this does appear to be a problem still in Maven 2.0.8 and I've
raised what seems to be a similar issue here: 
http://jira.codehaus.org/browse/SUREFIRE-427

Although my issue is focusing on test-resources completely missing in
the test-classpath.

 -- Cory

Olivier Catteau wrote:
> Hello,
>
> We have a few problems with the classpath used by surefire. Some tests fail
> randomly due to the order of the classpath managed by Surefire.
> During the execution of unit tests, it seems that the classpath used by
> maven differs from the classpath used by my IDE (IntelliJ).
> In IntelliJ, resources are loaded with the following order :
> /target/test-classes
> /target/classes
> .../aLib.jar
> .../anotherLib.jar
> ...
>
> But, by using maven2, the order is :
> ...
> .../aLib.jar
> /target/test-classes
> /target/classes
> .../anotherLib.jar
> ...
>
> Our projects use Surefire2.3.
> Is it possible to patch surefire to get a correct classpath (such as
> IntelliJ) ? Has this bug been fixed with maven2.0.8 ?
>
>
> Thanks.
>
> Regards,
> Alexandre Bunod and Olivier Catteau
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org