Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Tuesday, December 4, 2012

Defining dependency projects in Maven

The problem: You have 2 projects and one relies on the second. How to realize that with maven?

Solution: Make the inner one. And define it as dependency in the another. Use the same groupId and artifactId. Easy one!

But if project Z depends on projects A and project B. And A and B use different versions of a library. Which version will be used in calling project?

Here is the code of this situation: