You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grant Ingersoll <gs...@apache.org> on 2007/05/21 15:40:24 UTC

Surefire systemClassLoader option

I am having some trouble with class loading in tests.  For some tests  
in my set of tests, the only way the pass via M2 is if I set  
useSystemClassLoader to true per http://jira.codehaus.org/browse/ 
SUREFIRE-106.  On the other hand, some other subset of tests only  
pass if useSystemClassLoader is false.

One thing I see that is strange is, when useSystemClassLoader is  
true, my target/classes directory occurs before target/test-classes  
in the classpath, meaning the resources in src/main/resources are  
resolved before the ones in src/test/resources.

Has anyone else run into this or have suggestions on what to do?

Thanks,
Grant


--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp

Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
LuceneFAQ



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


Re: Surefire systemClassLoader option

Posted by Grant Ingersoll <gs...@apache.org>.
I will see if I can put together an example.

-Grant

On May 22, 2007, at 10:33 AM, Wayne Fay wrote:

> I can't be sure without seeing more information about the specific
> tests that are failing with the various options (lines of code that
> are breaking) and the Surefire/JUnit debug/error logs with more
> detailed info (from target/surefire-reports).
>
> Can you provide that? Then perhaps we can help you solve your  
> problems.
>
> Wayne
>
> On 5/21/07, Grant Ingersoll <gs...@apache.org> wrote:
>> I am having some trouble with class loading in tests.  For some tests
>> in my set of tests, the only way the pass via M2 is if I set
>> useSystemClassLoader to true per http://jira.codehaus.org/browse/
>> SUREFIRE-106.  On the other hand, some other subset of tests only
>> pass if useSystemClassLoader is false.
>>
>> One thing I see that is strange is, when useSystemClassLoader is
>> true, my target/classes directory occurs before target/test-classes
>> in the classpath, meaning the resources in src/main/resources are
>> resolved before the ones in src/test/resources.
>>
>> Has anyone else run into this or have suggestions on what to do?
>>
>> Thanks,
>> Grant
>>
>>
>> --------------------------
>> Grant Ingersoll
>> Center for Natural Language Processing
>> http://www.cnlp.org/tech/lucene.asp
>>
>> Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
>> LuceneFAQ
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp

Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
LuceneFAQ



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


Re: Surefire systemClassLoader option

Posted by Wayne Fay <wa...@gmail.com>.
I can't be sure without seeing more information about the specific
tests that are failing with the various options (lines of code that
are breaking) and the Surefire/JUnit debug/error logs with more
detailed info (from target/surefire-reports).

Can you provide that? Then perhaps we can help you solve your problems.

Wayne

On 5/21/07, Grant Ingersoll <gs...@apache.org> wrote:
> I am having some trouble with class loading in tests.  For some tests
> in my set of tests, the only way the pass via M2 is if I set
> useSystemClassLoader to true per http://jira.codehaus.org/browse/
> SUREFIRE-106.  On the other hand, some other subset of tests only
> pass if useSystemClassLoader is false.
>
> One thing I see that is strange is, when useSystemClassLoader is
> true, my target/classes directory occurs before target/test-classes
> in the classpath, meaning the resources in src/main/resources are
> resolved before the ones in src/test/resources.
>
> Has anyone else run into this or have suggestions on what to do?
>
> Thanks,
> Grant
>
>
> --------------------------
> Grant Ingersoll
> Center for Natural Language Processing
> http://www.cnlp.org/tech/lucene.asp
>
> Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
> LuceneFAQ
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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