Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

fix NoClassDefFound errors #62

Closed
wants to merge 3 commits into from
Closed

fix NoClassDefFound errors #62

wants to merge 3 commits into from

Conversation

stheves
Copy link

@stheves stheves commented Oct 26, 2016

targeting 6.0 api version and fix NoClassDefFound errors for google guava when using sonarsource sonar-maven-plugin > 3.0, tested with sonarqube server 6.0 alpine

…uava when using sonarsource sonar-maven-plugin > 3.0
@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.322% when pulling 7909f2d on stheves:sq6support into 981acfa on Pablissimo:sq6support.

@Pablissimo
Copy link
Owner

Doesn't targeting 6.0 prevent use on 5.6 LTS?

Presumably this only reproduces when using sonar-maven-plugin, and not when you manually do an analysis from the command line? I've got 5.6, 6.0 and 6.1 installs all running with 0.93 without error at the commandline but don't have a test-case for sonar-maven-plugin yet so that might be my missing link!

@stheves
Copy link
Author

stheves commented Oct 27, 2016

I don`t think that using the 6.0 API breaks the usage of SonarQube server 5.6 LTS. The JavaScript plugin does exactly the same and it is compatible with 5.6 LTS. See http://docs.sonarqube.org/display/PLUG/JavaScript+Plugin and the 2.17 version of the plugin.

You can only reproduce the error with sonar maven plugin. The error comes in because the LCOVParser uses google guava in line 200 (maybe in others too) and the guava lib is declared as test dependency. Now the guava lib is not available on runtime and you get the NoClassDefFound error. I`ve fixed it by explicitly declaring the dependency to sslr-core which brings in the transitive dependency to google guava.

@Pablissimo
Copy link
Owner

Cool, thanks - that's perfect info. To be honest, I'm wondering if I fix it by just removing the dependency entirely, given that it's used for seemingly literally one line in that file and nowhere else but shall investigate.

@stheves
Copy link
Author

stheves commented Oct 27, 2016

Oh yes that is maybe the better approach. I hadn`t too much time to investigate further, so declaring the dependency was the "quick fix".

@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.322% when pulling 80acea0 on stheves:sq6support into 981acfa on Pablissimo:sq6support.

@Pablissimo
Copy link
Owner

Equivalent fix to remove the dependency made in the 6.0-supporting rewrite, now available as release v0.94.

@Pablissimo Pablissimo closed this Oct 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants