0

I have a maven multi-module project . In the parent module there is a certain dependency which is mentioned in dependencyManagement-> dependencies section say x. Now in one of the child modules , few classes belonging to artifact x are being used.

So, ideally mvn clean install should not pass as we also need to mention the same dependency in the pom of child module.

But surprisingly mvn clean install passes from the command line but Intellij Idea asks to add dependency to the child pom. What might be the reason behind this behaviour

Rajeev Akotkar
  • 1,377
  • 4
  • 26
  • 46
  • Without the pom of the whole project...it's impossible even to guess... Without any information about version of Maven, IntelliJ, etc. – khmarbaise Mar 23 '22 at 07:19
  • Does `mvn install` actually build the :child" module? Also, make sure all the independent Maven pom.xml files are added to the project. Try **Reload** action in a Maven tool window. If the issue remains, we will need a sample project as it is too little details here. – Andrey Mar 23 '22 at 09:12

0 Answers0