you identified a test gap: I verified the plugin with different projects but all were built using Java 8… I’ll fix the issue with a 1.7.2 release and update the PR accordingly.
But for fixing this I have one question: The problem occurs because the JAXB runtime cannot be resolved. Interestingly exactly for this reason jQA itself as well as the jQA SQ plugin bundle a JAXB runtime, it is packaged into the lib folder of the plugin. But at execution time this cannot be resolved by the Sonar plugin classloader.
I’ve been looking into other plugins to see how they handle this and I found that obviously the sonar-xml-plugin has a similar issue and for that reason creates a shaded artifact. Is this the official way to go?
Felipe, the TCCL solution seems to work at least for SQ 7.9. The commit you’re references an issue that has been marked to be resolved for SQ 8.1, so maybe I’ll be running in troubles there. Will cross check against SQ 8.0 to be sure that my current solution works.
The current approach of overrding TCCL works for 8.0. But I think it would make sense to create an issue: There’ll probably be libraries being used by plugins that rely on TCCL (e.g. JAXB). SQ should ensure that this is set correctly while executing the sensors. What do you think?