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
In fact, you've got 2 ways to deal with the problem.
node and in each child that requires it, add the dependency in the
node. You can choose not to set the version of the dependency.
node, and each child will benefit from the dependency.So for example, if you declare this in the parent pom:
org.slf4j
slf4j-api
1.7.21
org.slf4j
slf4j-simple
1.7.21
runtime
Then slf4j-api
will be a dependency for all children. However, you will have to add a dependency on slf4j-simple
in the child's pom, should it require it:
org.slf4j
slf4j-simple
For the plugins, it works the same, but with the
and
nodes. All configuration can go in the parent pom's definition of the plugin, and you simply declare the plugin in the
section of your child pom.