Setting up custom sonar rule for Annotations

I guess that you are facing such problem in unit tests?

My guess is that you are missing test sources external binaries. See this part of the tutorial: How to test sources requiring external binaries (Note: clicking on the link does not always bring you to the correct category).

Basically, you have to add the dependency you are using in your tests in there. Also, make sure that the maven changes are loaded before running the tests. Last note: also make sure you are correctly setting the class path during the test.

1 Like