buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Duncan Jr" <stephen.dun...@gmail.com>
Subject Re: [buildr] Order of classpath for running tests
Date Wed, 25 Jun 2008 13:13:24 GMT
I think so.  Currently I know of cases that rely on this behavior in Maven
so that can override spring-configuration files, & the like.  Having the
same in buildr seems good to me.

-Stephen

On Wed, Jun 25, 2008 at 1:59 AM, Assaf Arkin <arkin@intalio.com> wrote:

> 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
> >
>



-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message