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: [EMAIL PROTECTED] > 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 <[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] > _________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008