You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by behlma <be...@googlemail.com> on 2008/05/14 22:08:49 UTC

Multiple test directories (scala/java) problem.

Hi there,
first of all I must say I'm amazed! Buildr does a terrific job!

I ran into a problem however: If I have a src/test/java and src/test/scala
directory , buildr seems to only compile and execute the java test directory
and forgets about the scala test directory (i.e. does not even try to
compile). Is there something I must put in my buildfile?

Thanks!

Marco
-- 
View this message in context: http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
Sent from the Buildr - User mailing list archive at Nabble.com.


Re: Multiple test directories (scala/java) problem.

Posted by Assaf Arkin <ar...@intalio.com>.
On Sat, May 17, 2008 at 6:20 AM, behlma <be...@googlemail.com> wrote:

>
> Hi Assaf,
> what actually happens if you have one source directory but both, Scala and
> Java files in it? Will it simply use the compiler that matches the first
> class?


The Groovy compile can compile both Groovy and Java files, so
compile.with(:groovy) will work that way.  I'm hearing from Alex that the
Scala compiler will also support this in the future, so you'll be able to
compile Scala and Java files together, but not here yet.


> It would be very nice to have this multiple directory capability. I'd
> just like to separate the source java from the scala classes, even though
> they'll end up in the same target directory anyway ;)


You can always do that, compile.from can accept any number of source
directories, just that right now it processes them all through the same
compiler.

Assaf


>
>
> Greets
> Marco
>
>
> Assaf Arkin wrote:
> >
> > On Thu, May 15, 2008 at 3:39 AM, behlma <be...@googlemail.com> wrote:
> >
> >>
> >> Hi Steve,
> >> there are actually dependencies between the two ;( It will be the two
> >> different directories, as it works fine with just one. For maven there's
> >> the
> >> build-helper plugin which allows you to use multiple test/src
> >> directories.
> >> I'm currently using that but then again Buildr seems to be so much
> nicer.
> >>
> >> Any chance of getting multiple test directories implemented? :)
> >
> >
> > Actually, only one of the source directories gets compiled into
> > target/test/classes, and so only those files get run by the test suite.
> >
> > So the first requirement would be, the ability to run two different
> > compilers in the same project, one for Java and one for Scala.
> >
> > I tried to do something like this before using the compile task, but it
> > ended up being a solution that would complicate life for developers who
> > don't care much for this feature.
> >
> > It should be possible, I'm just not sure what the right approach would
> be.
> >
> > Assaf
> >
> >
> >
> >>
> >>
> >> Thanks again
> >> Marco
> >>
> >>
> >>
> >> Steve Wall-2 wrote:
> >> >
> >> > If there aren't circular dependencies between scala and java, one
> >> solution
> >> > might be to have 2 projects. The problem might be two test directory
> >> > structures.
> >> >
> >> > On Wed, May 14, 2008 at 4:50 PM, behlma <be...@googlemail.com>
> wrote:
> >> >
> >> >>
> >> >> Hi Vigor,
> >> >> this isn't really the case, as I'm using JUnit for both, Java and
> >> Scala
> >> >> testing. So it really is the same framework, just multiple folders to
> >> >> test.
> >> >>
> >> >>
> >> >>
> >> >> Victor Hugo Borja wrote:
> >> >> >
> >> >> > Currently a project can only have one testing-framework, thus you
> >> >> cannot
> >> >> > use
> >> >> > for example junit and easyb on the same project.
> >> >> > I think this would be a desirable feature.
> >> >> >
> >> >> > Buildr tries to guess wich one to use from your project content, in
> >> >> your
> >> >> > case a java-testing framework is selected by src/test/java.
> >> >> >
> >> >> > On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com>
> >> wrote:
> >> >> >
> >> >> >>
> >> >> >> Hi there,
> >> >> >> first of all I must say I'm amazed! Buildr does a terrific job!
> >> >> >>
> >> >> >> I ran into a problem however: If I have a src/test/java and
> >> >> >> src/test/scala
> >> >> >> directory , buildr seems to only compile and execute the java test
> >> >> >> directory
> >> >> >> and forgets about the scala test directory (i.e. does not even try
> >> to
> >> >> >> compile). Is there something I must put in my buildfile?
> >> >> >>
> >> >> >> Thanks!
> >> >> >>
> >> >> >> Marco
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
> >> >> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> > --
> >> >> > vic
> >> >> >
> >> >> > Quaerendo invenietis.
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
> >> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17250381.html
> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17291688.html
> Sent from the Buildr - User mailing list archive at Nabble.com.
>
>


-- 
CTO, Intalio
http://www.intalio.com

Re: Multiple test directories (scala/java) problem.

Posted by behlma <be...@googlemail.com>.
Hi Assaf,
what actually happens if you have one source directory but both, Scala and
Java files in it? Will it simply use the compiler that matches the first
class? It would be very nice to have this multiple directory capability. I'd
just like to separate the source java from the scala classes, even though
they'll end up in the same target directory anyway ;)

Greets
Marco


Assaf Arkin wrote:
> 
> On Thu, May 15, 2008 at 3:39 AM, behlma <be...@googlemail.com> wrote:
> 
>>
>> Hi Steve,
>> there are actually dependencies between the two ;( It will be the two
>> different directories, as it works fine with just one. For maven there's
>> the
>> build-helper plugin which allows you to use multiple test/src
>> directories.
>> I'm currently using that but then again Buildr seems to be so much nicer.
>>
>> Any chance of getting multiple test directories implemented? :)
> 
> 
> Actually, only one of the source directories gets compiled into
> target/test/classes, and so only those files get run by the test suite.
> 
> So the first requirement would be, the ability to run two different
> compilers in the same project, one for Java and one for Scala.
> 
> I tried to do something like this before using the compile task, but it
> ended up being a solution that would complicate life for developers who
> don't care much for this feature.
> 
> It should be possible, I'm just not sure what the right approach would be.
> 
> Assaf
> 
> 
> 
>>
>>
>> Thanks again
>> Marco
>>
>>
>>
>> Steve Wall-2 wrote:
>> >
>> > If there aren't circular dependencies between scala and java, one
>> solution
>> > might be to have 2 projects. The problem might be two test directory
>> > structures.
>> >
>> > On Wed, May 14, 2008 at 4:50 PM, behlma <be...@googlemail.com> wrote:
>> >
>> >>
>> >> Hi Vigor,
>> >> this isn't really the case, as I'm using JUnit for both, Java and
>> Scala
>> >> testing. So it really is the same framework, just multiple folders to
>> >> test.
>> >>
>> >>
>> >>
>> >> Victor Hugo Borja wrote:
>> >> >
>> >> > Currently a project can only have one testing-framework, thus you
>> >> cannot
>> >> > use
>> >> > for example junit and easyb on the same project.
>> >> > I think this would be a desirable feature.
>> >> >
>> >> > Buildr tries to guess wich one to use from your project content, in
>> >> your
>> >> > case a java-testing framework is selected by src/test/java.
>> >> >
>> >> > On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com>
>> wrote:
>> >> >
>> >> >>
>> >> >> Hi there,
>> >> >> first of all I must say I'm amazed! Buildr does a terrific job!
>> >> >>
>> >> >> I ran into a problem however: If I have a src/test/java and
>> >> >> src/test/scala
>> >> >> directory , buildr seems to only compile and execute the java test
>> >> >> directory
>> >> >> and forgets about the scala test directory (i.e. does not even try
>> to
>> >> >> compile). Is there something I must put in my buildfile?
>> >> >>
>> >> >> Thanks!
>> >> >>
>> >> >> Marco
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
>> >> >> Sent from the Buildr - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > vic
>> >> >
>> >> > Quaerendo invenietis.
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
>> >> Sent from the Buildr - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17250381.html
>> Sent from the Buildr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17291688.html
Sent from the Buildr - User mailing list archive at Nabble.com.


Re: Multiple test directories (scala/java) problem.

Posted by Assaf Arkin <ar...@intalio.com>.
On Thu, May 15, 2008 at 3:39 AM, behlma <be...@googlemail.com> wrote:

>
> Hi Steve,
> there are actually dependencies between the two ;( It will be the two
> different directories, as it works fine with just one. For maven there's
> the
> build-helper plugin which allows you to use multiple test/src directories.
> I'm currently using that but then again Buildr seems to be so much nicer.
>
> Any chance of getting multiple test directories implemented? :)


Actually, only one of the source directories gets compiled into
target/test/classes, and so only those files get run by the test suite.

So the first requirement would be, the ability to run two different
compilers in the same project, one for Java and one for Scala.

I tried to do something like this before using the compile task, but it
ended up being a solution that would complicate life for developers who
don't care much for this feature.

It should be possible, I'm just not sure what the right approach would be.

Assaf



>
>
> Thanks again
> Marco
>
>
>
> Steve Wall-2 wrote:
> >
> > If there aren't circular dependencies between scala and java, one
> solution
> > might be to have 2 projects. The problem might be two test directory
> > structures.
> >
> > On Wed, May 14, 2008 at 4:50 PM, behlma <be...@googlemail.com> wrote:
> >
> >>
> >> Hi Vigor,
> >> this isn't really the case, as I'm using JUnit for both, Java and Scala
> >> testing. So it really is the same framework, just multiple folders to
> >> test.
> >>
> >>
> >>
> >> Victor Hugo Borja wrote:
> >> >
> >> > Currently a project can only have one testing-framework, thus you
> >> cannot
> >> > use
> >> > for example junit and easyb on the same project.
> >> > I think this would be a desirable feature.
> >> >
> >> > Buildr tries to guess wich one to use from your project content, in
> >> your
> >> > case a java-testing framework is selected by src/test/java.
> >> >
> >> > On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com>
> wrote:
> >> >
> >> >>
> >> >> Hi there,
> >> >> first of all I must say I'm amazed! Buildr does a terrific job!
> >> >>
> >> >> I ran into a problem however: If I have a src/test/java and
> >> >> src/test/scala
> >> >> directory , buildr seems to only compile and execute the java test
> >> >> directory
> >> >> and forgets about the scala test directory (i.e. does not even try to
> >> >> compile). Is there something I must put in my buildfile?
> >> >>
> >> >> Thanks!
> >> >>
> >> >> Marco
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
> >> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > vic
> >> >
> >> > Quaerendo invenietis.
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17250381.html
> Sent from the Buildr - User mailing list archive at Nabble.com.
>
>

Re: Multiple test directories (scala/java) problem.

Posted by behlma <be...@googlemail.com>.
Hi Steve,
there are actually dependencies between the two ;( It will be the two
different directories, as it works fine with just one. For maven there's the
build-helper plugin which allows you to use multiple test/src directories.
I'm currently using that but then again Buildr seems to be so much nicer.

Any chance of getting multiple test directories implemented? :)

Thanks again
Marco



Steve Wall-2 wrote:
> 
> If there aren't circular dependencies between scala and java, one solution
> might be to have 2 projects. The problem might be two test directory
> structures.
> 
> On Wed, May 14, 2008 at 4:50 PM, behlma <be...@googlemail.com> wrote:
> 
>>
>> Hi Vigor,
>> this isn't really the case, as I'm using JUnit for both, Java and Scala
>> testing. So it really is the same framework, just multiple folders to
>> test.
>>
>>
>>
>> Victor Hugo Borja wrote:
>> >
>> > Currently a project can only have one testing-framework, thus you
>> cannot
>> > use
>> > for example junit and easyb on the same project.
>> > I think this would be a desirable feature.
>> >
>> > Buildr tries to guess wich one to use from your project content, in
>> your
>> > case a java-testing framework is selected by src/test/java.
>> >
>> > On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com> wrote:
>> >
>> >>
>> >> Hi there,
>> >> first of all I must say I'm amazed! Buildr does a terrific job!
>> >>
>> >> I ran into a problem however: If I have a src/test/java and
>> >> src/test/scala
>> >> directory , buildr seems to only compile and execute the java test
>> >> directory
>> >> and forgets about the scala test directory (i.e. does not even try to
>> >> compile). Is there something I must put in my buildfile?
>> >>
>> >> Thanks!
>> >>
>> >> Marco
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
>> >> Sent from the Buildr - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > vic
>> >
>> > Quaerendo invenietis.
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
>> Sent from the Buildr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17250381.html
Sent from the Buildr - User mailing list archive at Nabble.com.


Re: Multiple test directories (scala/java) problem.

Posted by Steve Wall <st...@primetimesoftware.com>.
If there aren't circular dependencies between scala and java, one solution
might be to have 2 projects. The problem might be two test directory
structures.

On Wed, May 14, 2008 at 4:50 PM, behlma <be...@googlemail.com> wrote:

>
> Hi Vigor,
> this isn't really the case, as I'm using JUnit for both, Java and Scala
> testing. So it really is the same framework, just multiple folders to test.
>
>
>
> Victor Hugo Borja wrote:
> >
> > Currently a project can only have one testing-framework, thus you cannot
> > use
> > for example junit and easyb on the same project.
> > I think this would be a desirable feature.
> >
> > Buildr tries to guess wich one to use from your project content, in your
> > case a java-testing framework is selected by src/test/java.
> >
> > On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com> wrote:
> >
> >>
> >> Hi there,
> >> first of all I must say I'm amazed! Buildr does a terrific job!
> >>
> >> I ran into a problem however: If I have a src/test/java and
> >> src/test/scala
> >> directory , buildr seems to only compile and execute the java test
> >> directory
> >> and forgets about the scala test directory (i.e. does not even try to
> >> compile). Is there something I must put in my buildfile?
> >>
> >> Thanks!
> >>
> >> Marco
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
> >> Sent from the Buildr - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > vic
> >
> > Quaerendo invenietis.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
> Sent from the Buildr - User mailing list archive at Nabble.com.
>
>

Re: Multiple test directories (scala/java) problem.

Posted by behlma <be...@googlemail.com>.
Hi Vigor,
this isn't really the case, as I'm using JUnit for both, Java and Scala
testing. So it really is the same framework, just multiple folders to test.



Victor Hugo Borja wrote:
> 
> Currently a project can only have one testing-framework, thus you cannot
> use
> for example junit and easyb on the same project.
> I think this would be a desirable feature.
> 
> Buildr tries to guess wich one to use from your project content, in your
> case a java-testing framework is selected by src/test/java.
> 
> On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com> wrote:
> 
>>
>> Hi there,
>> first of all I must say I'm amazed! Buildr does a terrific job!
>>
>> I ran into a problem however: If I have a src/test/java and
>> src/test/scala
>> directory , buildr seems to only compile and execute the java test
>> directory
>> and forgets about the scala test directory (i.e. does not even try to
>> compile). Is there something I must put in my buildfile?
>>
>> Thanks!
>>
>> Marco
>> --
>> View this message in context:
>> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
>> Sent from the Buildr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> vic
> 
> Quaerendo invenietis.
> 
> 

-- 
View this message in context: http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17242684.html
Sent from the Buildr - User mailing list archive at Nabble.com.


Re: Multiple test directories (scala/java) problem.

Posted by Victor Hugo Borja <vi...@gmail.com>.
Currently a project can only have one testing-framework, thus you cannot use
for example junit and easyb on the same project.
I think this would be a desirable feature.

Buildr tries to guess wich one to use from your project content, in your
case a java-testing framework is selected by src/test/java.

On Wed, May 14, 2008 at 3:08 PM, behlma <be...@googlemail.com> wrote:

>
> Hi there,
> first of all I must say I'm amazed! Buildr does a terrific job!
>
> I ran into a problem however: If I have a src/test/java and src/test/scala
> directory , buildr seems to only compile and execute the java test
> directory
> and forgets about the scala test directory (i.e. does not even try to
> compile). Is there something I must put in my buildfile?
>
> Thanks!
>
> Marco
> --
> View this message in context:
> http://www.nabble.com/Multiple-test-directories-%28scala-java%29-problem.-tp17239777p17239777.html
> Sent from the Buildr - User mailing list archive at Nabble.com.
>
>


-- 
vic

Quaerendo invenietis.