buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: [buildr] Order of classpath for running tests
Date Wed, 25 Jun 2008 05:59:35 GMT
On Tue, Jun 24, 2008 at 7:50 AM, lacton <lacton@users.sourceforge.net> wrote:
> Hi,
>
> I'm using buildr 1.3.1.1 and I have an issue with the order of the
> classpath used to run my tests.
>
> My project directory structure is somewhat like that.
>
> myproject/
> --- src/
> ------ main/
> --------- java/
> --------- resources/
> ------------ myProperties.properties    # This one is for the real world
> ------ test/
> --------- java/
> --------- resources/
> ------------ myProperties.properties    # This one is for testing and
> should override the other one
>
> When I run 'buildr test', buildr launches my tests with the following
> classpath :
> ...lots of jars...:myproject/target/classes:myproject/target/resources:myproject/target/test/classes:myproject/target/test/resources:...a
> few jars for testing...
>
> The problem is that 'target/test/resources' comes after
> 'target/resources'. My tests are seeing the wrong property file.
>
> How would you tackle this issue?

test.with test.resources.target

this would add test.resources earlier in the classpath.

Separately, I don't remember paying attention to this, so maybe we
talk about what the right order should be, and if we're doing it
wrong, file an issue and fix it.

Would it be better for test classes/resources to come before compile
classes/resources so they load up earlier in the classpath?

Assaf

>
> Regards.
>
> --
> Lacton
>

Mime
View raw message