Reputation: 2996
I have a POM that describes a set of dependencies in it's dependencyManagement section. This set of dependencies defines what dependencies will be provided when I deploy my application so I want to stick to this list and not have my project redefine them.
Is there a way that I can inherit the managed dependencies from this POM without it being the parent POM of my project?
I would like to avoid specifying versions etc in my project POM.
Upvotes: 3
Views: 4171
Reputation: 38132
I think you're looking for something like:
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>someGroupId</groupId>
<artifactId>someArtifactId</artifactId>
<version>someVersion</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...
</dependencies>
</dependencyManagement>
You could define this e.g. in your parent POM.
Upvotes: 8