I looked at my effective pom.  I have a dependency there on JUnit 4.5.
The only reference to surefire was maven-surefire-reports-plugin in the
reporting section.

how do I know that surefire is using my dependency of JUnit 4.5?  Is maven
bundled with another version of JUnit and using an earlier version that I'm
not aware of?

How do I force the surefire plugin to use JUnit 4.5?

thanks

L



John Stoneham wrote:
> 
>>> On Wed, Dec 10, 2008 at 12:16 AM, CheapLisa <[EMAIL PROTECTED]>
>>> wrote:
>>>> I have JUnit 4.5 as a dependency in my maven pom
>>>> and I have imported annotations into my test case but
>>>> it is not recognizing the @Test and @Ignore annotations.
>>>>
>>>> I still have to preface the method name with "test"
>>>> and the @Ignore tests get executed.
>>>>
>>>> Is something broken?  What do I need to do to get this
>>>> to work like expected and to take advantage of JUnit 4.x
>>>> which has over a year of release now.
> 
> Hm. Last time this happened to me it was because I was trying to
> repackage JUnit with a bunch of other things, and it turned out
> surefire was inspecting my POM to look for a junit:junit dependency,
> then pulling the version off that to determine whether to look for
> JUnit 4 tests.
> 
> Sounds to me like surefire thinks your JUnit dependency is version 3.
> We've got JUnit 4.4 configured here and it runs both 3- and 4-style
> tests properly.
> 
> Is it possible to post the output of mvn help:effective-pom here?
> 
> - John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20943444.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to