SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-1157

SCM Activity plugin fails detecting the revision with mercurial

    Details

    • Number of attachments :
      1

      Description

      runing Sonar on my project, the first run works fine and the revision shows up in Sonar, running a second time, i get the following exception breaking the build:

      [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:sonar (default-cli) on project framework-lib: Can not execute Sonar: Fail to retrieve changelog from revision 8a3f5d073a8b: Exception while executing SCM command. Unsupported method for this provider. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:sonar (default-cli) on project framework-lib: Can not execute Sonar
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
      	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
      	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 19 more
      Caused by: org.sonar.api.utils.SonarException: Fail to retrieve changelog from revision 8a3f5d073a8b
      	at org.sonar.plugins.scmactivity.Changelog.retrieveChangeSets(Changelog.java:116)
      	at org.sonar.plugins.scmactivity.Changelog.load(Changelog.java:55)
      	at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:83)
      	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:59)
      	at org.sonar.batch.phases.Phases.execute(Phases.java:75)
      	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:55)
      	at org.sonar.batch.Batch.analyzeModule(Batch.java:158)
      	at org.sonar.batch.Batch.analyzeModules(Batch.java:76)
      	at org.sonar.batch.Batch.execute(Batch.java:62)
      	at org.sonar.maven3.SonarMojo.executeBatch(SonarMojo.java:144)
      	at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:135)
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
      	... 23 more
      Caused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.
      	at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:63)
      	at org.apache.maven.scm.provider.hg.HgScmProvider.changelog(HgScmProvider.java:211)
      	at org.apache.maven.scm.provider.AbstractScmProvider.changeLog(AbstractScmProvider.java:311)
      	at org.apache.maven.scm.provider.AbstractScmProvider.changeLog(AbstractScmProvider.java:293)
      	at org.apache.maven.scm.manager.AbstractScmManager.changeLog(AbstractScmManager.java:362)
      	at org.sonar.plugins.scmactivity.Changelog.retrieveChangeSets(Changelog.java:101)
      	... 34 more
      Caused by: org.apache.maven.scm.ScmException: Unsupported method for this provider.
      	at org.apache.maven.scm.command.changelog.AbstractChangeLogCommand.executeChangeLogCommand(AbstractChangeLogCommand.java:53)
      	at org.apache.maven.scm.command.changelog.AbstractChangeLogCommand.executeCommand(AbstractChangeLogCommand.java:77)
      	at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
      	... 39 more
      

        Issue Links

          Activity

          Hide
          Evgeny Mandrikov added a comment -

          Hi René,
          Could you please specify version of SCM Activity Plugin?
          I suppose that it's 1.2. If so, then it was fixed in 1.3 - see SONARPLUGINS-1067

          Show
          Evgeny Mandrikov added a comment - Hi René, Could you please specify version of SCM Activity Plugin? I suppose that it's 1.2. If so, then it was fixed in 1.3 - see SONARPLUGINS-1067
          Hide
          René Brandenburger added a comment -

          Checked the versions - it states 1.3...

          Plugin Version Description
          Artifact Size 0.2 Measure the size of the project artifact.
          Branding 0.1 Allows to add your own logo to the Sonar UI.
          Clirr 1.0 Checks Java libraries for binary and source compatibility with older releases.
          Motion Chart 1.2 Display how a set of metrics evolves over time.
          PDF Report 1.2 Sonar plugin for PDF reporting
          Quality Index 1.1.3 Calculate a global Quality Index, based on coding rules, Style, Complexity and Coverage.
          Radiator 1.1 Display measures in a big treemap.
          SCM Activity 1.3 Collects and reports information from SCM.
          SIG Maintainability Model 1.0.1 Implementation of the SIG Maintainability Model.
          Security Rules 0.3.1 Enables to monitor closely a defined set of security rules.
          Switch Off Violations 1.0
          Taglist 1.0 Analyze various tags found in the code, like @todo or //TODO.
          Technical Debt 1.2.1 Calculates in US Dollars the work required to fix all quality issues in source code.
          Timeline 1.1 Advanced time machine chart.
          Total Quality 1.0.2 Provides an overall measure of the quality of the project, linking code quality, design, architecture, and unit testing.
          Trac 0.2 Retrieves and reports the number of project issues from a Trac instance.
          Web 1.0.2 Analyze web code.
          Xml 0.1 Analyze XML and XHTML documents.
          fb-contrib 1.0 New Findbugs rules (see http://fb-contrib.sourceforge.net)

          System plugins
          Checkstyle Analyze Java code with Checkstyle 5.1.
          Cobertura Get code coverage with Cobertura.
          Core Provides all common components required to cover all languages.
          Database Cleaner Optimizes database performances by removing old and useless data.
          Design Analyze Java bytecode to compute O.O. metrics and extract dependencies between resources.
          Duplications Find duplicated source code within project.
          Findbugs Analyze Java code with Findbugs 1.3.9.
          Google analytics Add the Google Analytics tracking script to the Sonar web application
          PMD Analyze Java code with PMD 4.2.5.
          Squid for Java Squid analyzer for Java.
          Surefire Get results of unit tests with Surefire.

          Show
          René Brandenburger added a comment - Checked the versions - it states 1.3... Plugin Version Description Artifact Size 0.2 Measure the size of the project artifact. Branding 0.1 Allows to add your own logo to the Sonar UI. Clirr 1.0 Checks Java libraries for binary and source compatibility with older releases. Motion Chart 1.2 Display how a set of metrics evolves over time. PDF Report 1.2 Sonar plugin for PDF reporting Quality Index 1.1.3 Calculate a global Quality Index, based on coding rules, Style, Complexity and Coverage. Radiator 1.1 Display measures in a big treemap. SCM Activity 1.3 Collects and reports information from SCM. SIG Maintainability Model 1.0.1 Implementation of the SIG Maintainability Model. Security Rules 0.3.1 Enables to monitor closely a defined set of security rules. Switch Off Violations 1.0 Taglist 1.0 Analyze various tags found in the code, like @todo or //TODO. Technical Debt 1.2.1 Calculates in US Dollars the work required to fix all quality issues in source code. Timeline 1.1 Advanced time machine chart. Total Quality 1.0.2 Provides an overall measure of the quality of the project, linking code quality, design, architecture, and unit testing. Trac 0.2 Retrieves and reports the number of project issues from a Trac instance. Web 1.0.2 Analyze web code. Xml 0.1 Analyze XML and XHTML documents. fb-contrib 1.0 New Findbugs rules (see http://fb-contrib.sourceforge.net ) System plugins Checkstyle Analyze Java code with Checkstyle 5.1. Cobertura Get code coverage with Cobertura. Core Provides all common components required to cover all languages. Database Cleaner Optimizes database performances by removing old and useless data. Design Analyze Java bytecode to compute O.O. metrics and extract dependencies between resources. Duplications Find duplicated source code within project. Findbugs Analyze Java code with Findbugs 1.3.9. Google analytics Add the Google Analytics tracking script to the Sonar web application PMD Analyze Java code with PMD 4.2.5. Squid for Java Squid analyzer for Java. Surefire Get results of unit tests with Surefire.
          Hide
          Richard Bywater added a comment -

          Also a problem for me - digging into the code it looks as though the Mercurial Maven plugin doesn't support revision based changeLogs?! (Of course, I'm not a Maven expert so could be missing something )

          Show
          Richard Bywater added a comment - Also a problem for me - digging into the code it looks as though the Mercurial Maven plugin doesn't support revision based changeLogs?! (Of course, I'm not a Maven expert so could be missing something )
          Hide
          Matt Darby added a comment -

          Does anyone know if there a fix or a work around for this?

          Show
          Matt Darby added a comment - Does anyone know if there a fix or a work around for this?
          Hide
          Vladimir Kralik added a comment -

          I was digging in maven-scm-plugin code. I think, that the problem is this SCM-658

          Show
          Vladimir Kralik added a comment - I was digging in maven-scm-plugin code. I think, that the problem is this SCM-658
          Hide
          Vladimir Kralik added a comment -

          Hello all,

          I've made fix for SCM-658.
          My build for sonar-scm-activity plugin is attached. The only change is upgrade to newest maven-scm-plugin with my patches applied.

          Show
          Vladimir Kralik added a comment - Hello all, I've made fix for SCM-658 . My build for sonar-scm-activity plugin is attached. The only change is upgrade to newest maven-scm-plugin with my patches applied.
          Hide
          Vladimir Kralik added a comment -

          My patches to SCM-658 were accepted and they are included in maven-scm-plugin 1.7. So I could realise simple fix to sonar-scm-activity.

          https://github.com/vlk32/sonar-scm-activity/commit/701388dc7bb430e70414aa90c04b0b6b2a35ee12

          Show
          Vladimir Kralik added a comment - My patches to SCM-658 were accepted and they are included in maven-scm-plugin 1.7. So I could realise simple fix to sonar-scm-activity. https://github.com/vlk32/sonar-scm-activity/commit/701388dc7bb430e70414aa90c04b0b6b2a35ee12

            People

            • Assignee:
              Unassigned
              Reporter:
              René Brandenburger
            • Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: