Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore checkstyle validation on nemo.sonarqube.org #1319

Closed
romani opened this issue Jul 8, 2015 · 1 comment
Closed

Restore checkstyle validation on nemo.sonarqube.org #1319

romani opened this issue Jul 8, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@romani
Copy link
Member

romani commented Jul 8, 2015

http://nemo.sonarqube.org/dashboard/index?id=com.puppycrawl.tools%3Acheckstyle
Last analysis was done at - Version 6.8-SNAPSHOT / June 2 2015 9:51 PM

Discussion with Sonar team - https://groups.google.com/forum/#!topic/sonarqube/bYanojEy9LI

Problem is that checkstyle project is failed to build on java7 by sonar team, their command :

mvn clean install cobertura:cobertura -Dcobertura.report.format=xml -Dmaven.test.failure.ignore=true -V -Dcheckstyle.skip=true -Dpmd.skip=true -Dcobertura.skip=true

output:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:37.456s
[INFO] Finished at: Wed Jul 01 06:49:14 CEST 2015
[INFO] Final Memory: 44M/495M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project checkstyle: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: com/puppycrawl/tools/checkstyle/api/CheckstyleException
[ERROR] at java.lang.Class.getDeclaredMethods0(Native Method)
[ERROR] at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
[ERROR] at java.lang.Class.getMethod0(Class.java:2813)
[ERROR] at java.lang.Class.getMethod(Class.java:1663)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:57)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:64)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:59)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:54)
[ERROR] at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:52)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:97)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:222)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:107)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.api.CheckstyleException
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[ERROR] ... 15 more
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

on java7 cobertura is failing to path "check":

[INFO] <<< cobertura-maven-plugin:2.7:check (default) @ checkstyle <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.7:check (default) @ checkstyle --- [INFO] Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[INFO] Cobertura: Loaded information on 353 classes.
[ERROR] com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader failed coverage check. Line coverage rate of 76.9% is below 77.0%
[ERROR] com.puppycrawl.tools.checkstyle.checks.metrics.NPathComplexityCheck failed coverage check. Line coverage rate of 89.6% is below 90.0%
[ERROR] com.puppycrawl.tools.checkstyle.checks.ClassResolver failed coverage check. Line coverage rate of 92.9% is below 93.0%
[ERROR] com.puppycrawl.tools.checkstyle.api.FileContents failed coverage check. Line coverage rate of 92.8% is below 93.0%
[ERROR] com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck failed coverage check. Line coverage rate of 87.9% is below 88.0% [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:42.905s
[INFO] Finished at: Mon Jul 06 08:12:32 CEST 2015
[INFO] Final Memory: 63M/495M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.7:check (default) on project checkstyle: Coverage check failed. See messages above. -> [Help 1]
@romani romani added the approved label Jul 8, 2015
@romani romani self-assigned this Jul 8, 2015
@romani romani changed the title Restore chon checkstyle validation on nemo.sonarqube.org Restore checkstyle validation on nemo.sonarqube.org Jul 8, 2015
@romani
Copy link
Member Author

romani commented Jul 8, 2015

new profile was created that will be activated only for java8, so all launches on java7 will skip cobertura:check phase, but Travis will catch such contributors.

@romani romani closed this as completed Jul 8, 2015
@romani romani added this to the 6.9 milestone Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant