-2

While installing project, I have got an error which says "Used undeclared dependencies found"

I tried using maven dependency plugin and used tag. But still, the error is same.

Then I tried explicitly adding the dependency in the main pom, but still the same error was thrown.

Can anyone help me in this situation?

Thanks in advance.

Nirmal
  • 21
  • 1
  • 1
  • 6
  • 2
    Welcome to Stack Overflow! To receive help, I suggest you read [ask] then [edit] your question to provide a [mcve] demonstrating the issue. Include the exact error (are you getting an error or a warning?) in the question itself. Maybe this can help: https://stackoverflow.com/questions/4565740/what-are-unused-undeclared-dependencies-in-maven-what-to-do-with-them – Slaw Mar 24 '19 at 20:00

1 Answers1

0

The error means that you use classes of a dependency that you did not explicitly add to your POM (so the classes are resolved through transitive dependencies).

So adding the dependency to the project should eliminate the error. You said this was not the case but I guess you made some mistake when you added the dependency.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142