Hi,
Recently I've got a comment saying that our builds contain a lot of warnings about missing bytecode of dependencies. We're using the sonar maven scanner to invoke our analysis so I assumed that we had some illogical dependency scope override going on. Once I started looking into it I came to the conclusion that it's related to the usage of 'provided' dependencies.
So I've created a small reproducer to show what happens.
Repo:
https://git.johnnei.org/Johnnei/sonarqube-bugs/tree/provided-dependencyBuild log:
https://git.johnnei.org/Johnnei/sonarqube-bugs/builds/2162When looking at the classpaths provided to the analyser it is perfectly aligned with the rules of transitive dependencies of maven. However for the second module the analyser wants the bytecode of Field (Annotation on Entity#username) but alas: it's not a transitive dependency of the project and thus the bytecode is not provided.
How should I resolve these warnings or should this be considered a bug in the maven plugin?
Kind regards,
Johan.