문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top