Ok, switching Surefire to 2.2 and the unit test to JUnit 3 actually
resulted in a successful run. So I went back to that old thread and
actually read it :-)
http://objectstyle.org/cayenne/lists/cayenne-devel/2007/03/0065.html
and it turns out that we need this for the surefire plugin:
<useSystemClassLoader>true</useSystemClassLoader>
After that I was able to run your original unit test under JUnit 4 and
Surefire 2.3.
Andrus
On Dec 17, 2007, at 11:09 PM, Andrus Adamchik wrote:
> Although ... I am not so sure that it was all that successful, as
> the message is "There are no tests to run."... Never experimented
> with JUnit 4, not sure if the Surefire downgrade resulted in
> skipping the unit tests all together?
>
> Andrus
>
>
>
> On Dec 17, 2007, at 10:59 PM, Andrus Adamchik wrote:
>
>> Turned out we've been bitten by this in Cayenne.... This is a
>> surefire Maven plugin bug that breaks the Cayenne agent. Once I
>> added version 2.2 to the plugin declaration I was able to run the
>> test successfully:
>>
>> ....
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-surefire-plugin</artifactId>
>> <version>2.2</version>
>> ....
>>
>> $ mvn test -Pcayenne
>>
>>
>> [INFO] Surefire report directory: /Users/andrus/Desktop/core/target/
>> surefire-reports
>> *** CayenneAgent starting...
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> There are no tests to run.
>>
>> Results :
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>> On Dec 11, 2007, at 7:48 PM, Gilberto C Andrade wrote:
>>
>>> Would you mind check my project?(attach)
>>>
>>> Gilberto
>>> <core.tar.gz>
>>
>>
>
>
This archive was generated by hypermail 2.0.0 : Mon Dec 17 2007 - 16:41:44 EST