where to define test maven dependencies

Philipp :

I want to supply test dependencies like spring, mockito and junit in every project to make it as easy as possible to write tests. Should I use dependency management for this dependencies or define them in the parent pom?

praneet drolia :

Yes , You don't need to define the dependency in every project. Just define the dependency in parent pom. Child project will automatically inherits its parent pom. Also If you want to use different version of Mockito or anything. Just override the parent dependency in child one.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=92167&siteId=1