You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jason Dillon <ja...@planet57.com> on 2007/04/01 21:40:09 UTC

Adding extra dirs for surefire classpath

Whats the easiest way to add an extra directory to the classpath  
which surefire will use when running tests?

--jason 

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


Re: Adding extra dirs for surefire classpath

Posted by Jason Dillon <ja...@planet57.com>.
On Apr 1, 2007, at 2:38 PM, David J. M. Karlsen wrote:
> Jason Dillon skrev:
>> Whats the easiest way to add an extra directory to the classpath  
>> which surefire will use when running tests?
> http://jira.codehaus.org/browse/SUREFIRE-180
> Also - you could try defining system scoped dependencies - or  
> define them as testResource's

Not sure how system scoped dependencies would help at all... the  
sources are in the module I'm testing, to make that work I'd have to  
split up the module, which is lame.

I did try adding them as testResources, but stupid Surefire complains  
about duplicate test sets.  I'm really not happy with Surefire, I've  
spent the last day or so fighting with it to simply run some tests.   
I'm starting to think about just using Antrun and the Junit task.

Why does surefire need to be so damn magical?  Just let me run Junit  
or TestNG like the ant-versions do and be done with it.

Or fix the plugin so I can actually have full control over what its  
doing.  For example, I don't want any *.xml based tests to be run,  
but with surefire if I happen to have a file named like MyTest.xml,  
and then include **/*Test.* to run, then if I have a MyTest.java  
surefire complains about duplicate test tests.

I've also seen surefire complain about pojo-based tests... where did  
I configure surefire to use pojo muck?  This is all junit and I don't  
want any thing else to be run except for normal junit things.

And why is the include/exclude list so dang magical too... I never  
really understood why you configure the *.java bits to include vs.  
the class names/packages to run.  I'm even more confused by this,  
since I have *.java and *.groovy tests... so wtf is surefire doing...  
as with its default includes which are all *.java based, I can  
execute *.groovy tests with no additional configuration.

Anyways... I hope something can be done to make the surefire plugin  
more robust and compatible.  I keep running into problems with it and  
have to work around it, which is a HUGE PITA.

I guess its getting better slowly, but it seems to also get new bugs  
when features are added like when redirectTestOutputToFile is true,  
output might be corrupted.  Or altering the default classloading,  
which broke in 2.3 with tests that worked with 2.2.

:-(

--jason

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


Re: Adding extra dirs for surefire classpath

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Jason Dillon skrev:
> Whats the easiest way to add an extra directory to the classpath which 
> surefire will use when running tests?
http://jira.codehaus.org/browse/SUREFIRE-180
Also - you could try defining system scoped dependencies - or define 
them as testResource's



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