devcon5io / mutation-analysis-plugin

Plugin for SonarQube to process mutation analysis results.
GNU Lesser General Public License v3.0
30 stars 17 forks source link

Pitest sensor fails when analysing reports since upgrading to Sonarqube 9.1 #53

Closed pbq closed 2 years ago

pbq commented 3 years ago

Hi,

We have recently upgraded SonarQube from 8.2 to 9.1 . The Mutation plugin is failing when analysing pit reports

Environment:

SonarQube Version : Community Edition, Version 9.1 (build 47736) PITest Plugin Version : 1.6.4 pitest-junit5-plugin Version: 0.12 Mutation analysis Plugin Version : 1.5 JDK16

Plugin Logs : INFO] 14:17:27.635 Pitest Sensor [java, kotlin] running on [key=project] in /home/user/git/project [DEBUG] 14:17:27.635 Reading mutants [DEBUG] 14:17:27.645 Searching pit reports in /home/user/git/project/target/pit-reports [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14:14 min [INFO] Finished at: 2021-10-08T14:17:28+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project project: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar: com/ctc/wstx/exc/WstxParsingException [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/home/user/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.0.2155/sonar-maven-plugin-3.9.0.2155.jar [ERROR] urls[1] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar [ERROR] urls[2] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls[3] = file:/home/user/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar [ERROR] urls[4] = file:/home/user/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.1.361/sonar-scanner-api-2.16.1.361.jar [ERROR] urls[5] = file:/home/user/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : com.ctc.wstx.exc.WstxParsingException [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project project: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar: com/ctc/wstx/exc/WstxParsingException

realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/home/user/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.0.2155/sonar-maven-plugin-3.9.0.2155.jar urls[1] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar urls[2] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar urls[3] = file:/home/user/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar urls[4] = file:/home/user/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.1.361/sonar-scanner-api-2.16.1.361.jar urls[5] = file:/home/user/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]]


at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar: com/ctc/wstx/exc/WstxParsingException

realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/home/user/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.0.2155/sonar-maven-plugin-3.9.0.2155.jar urls[1] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar urls[2] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar urls[3] = file:/home/user/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar urls[4] = file:/home/user/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.1.361/sonar-scanner-api-2.16.1.361.jar urls[5] = file:/home/user/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]]


at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar: com/ctc/wstx/exc/WstxParsingException

realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/home/user/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.0.2155/sonar-maven-plugin-3.9.0.2155.jar urls[1] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar urls[2] = file:/home/user/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar urls[3] = file:/home/user/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar urls[4] = file:/home/user/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.1.361/sonar-scanner-api-2.16.1.361.jar urls[5] = file:/home/user/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]]


at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:169)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Caused by: java.lang.NoClassDefFoundError: com/ctc/wstx/exc/WstxParsingException at ch.devcon5.sonar.plugins.mutationanalysis.report.Reports.readMutants (Reports.java:78) at ch.devcon5.sonar.plugins.mutationanalysis.sensors.ReportCollector.collectLocalMutants (ReportCollector.java:108) at ch.devcon5.sonar.plugins.mutationanalysis.sensors.PitestSensor.execute (PitestSensor.java:142) at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse (AbstractSensorWrapper.java:48) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:85) at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1 (ModuleSensorsExecutor.java:59) at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy (ModuleSensorsExecutor.java:77) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:59) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart (ModuleScanContainer.java:79) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.scanner.scan.ProjectScanContainer.scan (ProjectScanContainer.java:382) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively (ProjectScanContainer.java:378) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart (ProjectScanContainer.java:347) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart (GlobalContainer.java:136) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.batch.bootstrapper.Batch.doExecute (Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:66) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:567) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60) at jdk.proxy3.$Proxy25.execute (Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute (EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute (EmbeddedScanner.java:138) at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:65) at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:567) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.lang.ClassNotFoundException: com.ctc.wstx.exc.WstxParsingException at org.sonar.classloader.ParentFirstStrategy.loadClass (ParentFirstStrategy.java:39) at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:87) at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:76) at ch.devcon5.sonar.plugins.mutationanalysis.report.Reports.readMutants (Reports.java:78) at ch.devcon5.sonar.plugins.mutationanalysis.sensors.ReportCollector.collectLocalMutants (ReportCollector.java:108) at ch.devcon5.sonar.plugins.mutationanalysis.sensors.PitestSensor.execute (PitestSensor.java:142) at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse (AbstractSensorWrapper.java:48) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:85) at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1 (ModuleSensorsExecutor.java:59) at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy (ModuleSensorsExecutor.java:77) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:59) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart (ModuleScanContainer.java:79) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.scanner.scan.ProjectScanContainer.scan (ProjectScanContainer.java:382) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively (ProjectScanContainer.java:378) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart (ProjectScanContainer.java:347) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart (GlobalContainer.java:136) at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123) at org.sonar.batch.bootstrapper.Batch.doExecute (Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:66) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:567) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60) at jdk.proxy3.$Proxy25.execute (Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute (EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute (EmbeddedScanner.java:138) at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:65) at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:567) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [ERROR] [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/PluginContainerException

Can you help?

Thanks in advance

Regards Pierre

gmuecke commented 3 years ago

Hello Pierre, thank you for reporting. I'll look into it

gmuecke commented 3 years ago

Hello @pbq I bumped version to the latest LTS api version and tested it locally with 9.1 and it worked Could you verify if that solves your problem (build plugin from development branch)

If so, I can prepare the release and publish it to the update center

Regards, Gerald

sanmibuh commented 3 years ago

The same issue with our upgrade from 8.3 -> 9.1

Environment:

SonarQube Version : Developer Edition, Version 9.1 (build 47736) Gradle 7.2 JDK11 Gradle sonarqube plugin: org.sonarqube : 3.3 Gradle pitest plugin: info.solidsoft.pitest : 1.7.0 Sonar Mutation analysis Plugin Version : 1.5

Caused by: java.lang.NoClassDefFoundError: com/ctc/wstx/exc/WstxParsingException

With sonar 8.3 and the same Sonar Mutation analysis Plugin Version : 1.5 works well

sanmibuh commented 3 years ago

Same issue with Sonarqube 9.0.1.46107

With Sonarqube 8.9 LTS works

gmuecke commented 3 years ago

@sanmibuh , have you tried the version from the development branch (checkout & build yourself)? If that solves your problem, I'm going to release that within the next days or weeks

pbq commented 3 years ago

Hi @gmuecke the team succeeded in testing the snapshot version of the plugin.

Thank you very much. I'm waiting for the release 👍

sanmibuh commented 3 years ago

Hi @gmuecke There are 5 failing tests in development branch:


Results :

Failed tests:
  PitestSensorTest.execute_coverageThresholdRuleActive_belowThreshold_moreMutantsMissing:361 No element found matching assertions
  PitestSensorTest.execute_coverageThresholdRuleActive_belowThreshold_twoMutantMissing:337 No element found matching assertions
  RulesProcessorTest.processRules_coverageThresholdRuleActive_customEffortFactor_coverageTooLow_issueCreated:363->assertIssueAtLine:457->assertIssueAtLine:480 expected:<...ion coverage from 75[.0% to 80.]0%> but was:<...ion coverage from 75[,0% to 80,]0%>
  RulesProcessorTest.processRules_coverageThresholdRuleActive_defaultEffortFactor_coverageTooLow_issueCreated:340->assertIssueAtLine:457->assertIssueAtLine:480 expected:<...ion coverage from 75[.0% to 80.]0%> but was:<...ion coverage from 75[,0% to 80,]0%>
  RulesProcessorTest.processRules_coverageThresholdRuleActive_gapIsSamllerThan05_RoundedUp_issueCreated:446->assertIssueAtLine:457->assertIssueAtLine:480 expected:<...ion coverage from 77[.8% to 80.]0%> but was:<...ion coverage from 77[,8% to 80,]0%>

Tests run: 274, Failures: 5, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.833 s
[INFO] Finished at: 2021-11-23T07:41:45+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project mutation-analysis-plugin: There are test failures.```
gmuecke commented 3 years ago

Oh those are indeed interessting, the good news is, the test do succeeed on my build server and also on my machine. But the error message you provided points at the problem:

75[.0% to 80.]0%> but was:<...ion coverage from 75[,0% to 80,]0

On your system the decimal point is a comma (,) , while the test expects a dot (.).

What is your system's locale? maybe I could improve the test and make it less prone to locale issues

gmuecke commented 3 years ago

I could reproduce the issue with "es" locale. I added an override to the Locale to always use English, so the build should work now on your system, too.

mgonzcast commented 3 years ago

@gmuecke Thanks! I successfully built the plugin. One comment though, as mentioned in my earlier comment https://github.com/devcon5io/mutation-analysis-plugin/issues/55 , due to my old Maven version I had to add this at the end of the pom.xml file:

<pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
</project>

Just in case someone bumps with https errors

sanmibuh commented 3 years ago

@gmuecke Yes, I'm Spanish :) Checked and the build is done successfully I will try with our Sonarqube 9.2 instance

Thanks!

mgonzcast commented 3 years ago

@sanmibuh I´m Spanish too! :)

gmuecke commented 2 years ago

Is fixed in Release 1.6, public announcement https://community.sonarsource.com/t/new-release-mutation-analysis-1-6/54174

Soon to be available in Market Place

Thank you very much for reporting the issue and the contribution!