How to inherit dependency from a parent pom to a child pom

后端 未结 4 558
借酒劲吻你
借酒劲吻你 2020-12-23 17:10

I am new in using maven and jenkins. I am trying to inherit the dependencies from parent pom to child pom it shows the following errors:

[ERROR] COMPILATION          


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 18:02

    You should declare dependencies you want to inherit under a section to achieve this. is used for definitions that must be referenced later, whenever needed, within the of a particular child to become effective.

    UPDATE: Be careful when declaring dependencies that every child pom will inherit. Very quickly you can end up having dependencies you don't really need just because they are declared in the parent. As mentioned by other commenters, may be a better choice, although it isn't what you wanted originally.

提交回复
热议问题