What I'm saying is that the surefire plugin is responsible for bootstrapping
Junit4, but does not follow all of its conventions.  It has its own
conventions.  If you want to use Junit4 in maven, that means you use
surefire to call into Junit4.   If you don't like the default configuration
for the surefire plugin, feel free to override it in a parent pom (and all
your children will make use of it).

Here's the relevant section of the surefire plugin website:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html

On Fri, Dec 12, 2008 at 11:02 PM, CheapLisa <l...@purpleblade.net> wrote:

>
> What does group-a and artifact-a refer to?
>
> so I have to do this in every pom in every sub-module?  Is there anything I
> can do in the top level pom that will take care of the whole project?
>
> What you are saying is that the surefire plugin is not JUnit4 enabled?
>
> thanks
>
> CL
>
>
>
> mgainty wrote:
> >
> >
> > place the groupId/artifactId/version in the dependencies in
> > dependencyManagement Section of the parent pom
> > <project>
> >   ...
> >   <dependencyManagement>
> >     <dependencies>
> >       <dependency>
> >         <groupId>group-a</groupId>
> >         <artifactId>artifact-a</artifactId>
> >         <version>1.0</version>
> >
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> >
> > hth
> > Martin
> > ______________________________________________
> > Disclaimer and confidentiality note
> > Everything in this e-mail and any attachments relates to the official
> > business of Sender. This transmission is of a confidential nature and
> > Sender does not endorse distribution to any party other than intended
> > recipient. Sender does not necessarily endorse content contained within
> > this transmission.
> >
> >
> >
> >
> >> Date: Wed, 10 Dec 2008 12:44:45 -0800
> >> From: l...@purpleblade.net
> >> To: users@maven.apache.org
> >> Subject: Re: Is Maven / JUnit 4.x broken (annotations)
> >>
> >>
> >> 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 <l...@purpleblade.net>
> >> >>> 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: users-unsubscr...@maven.apache.org
> >> > For additional commands, e-mail: users-h...@maven.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> 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: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >
> > _________________________________________________________________
> > Send e-mail faster without improving your typing skills.
> >
> http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
> >
>
> --
> View this message in context:
> http://www.nabble.com/Is-Maven---JUnit-4.x-broken-%28annotations%29-tp20929389p20987238.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to