SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2606

SCM stats is failing when no url defined while ScmActivitySensor was not

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: SCMSTATS-0.1
    • Fix Version/s: SCMSTATS-0.2
    • Component/s: SCM Stats
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I am analysing an ant project. by default my scm activity plugin was set to true but SCM url was not set. I had no issue processing a sonar analysis until I installed SCM Stats plugin which made my build to fail. I feel that the same behavior should occur for both SCM plugins.

        Activity

        Hide
        Papapetrou Patroklos added a comment -

        Hi Stephane. Thanks for the feedback. Which version of SCM activity are you using because the latest one (1.5) has the same behavior as Scm stats -> If the url is not set then the analysis fails.
        Nevertheless I agree with your point so next release of SCM Stats plugin will fix it

        Show
        Papapetrou Patroklos added a comment - Hi Stephane. Thanks for the feedback. Which version of SCM activity are you using because the latest one (1.5) has the same behavior as Scm stats -> If the url is not set then the analysis fails. Nevertheless I agree with your point so next release of SCM Stats plugin will fix it
        Hide
        stephane Renou added a comment -

        Hi Patroklos,
        Thanks for the quick feedback.

        I am using SCM release 1.5

        I am still facing some issues on one project.

        sonar:sonar] 04:48:41.706 INFO p.PhasesTimeProfiler - Sensor ScmActivitySensor...
        [sonar:sonar] 04:48:41.706 INFO o.s.p.s.ScmUrlGuess - Trying to guess scm provider from project layout...
        [sonar:sonar] 04:48:41.706 INFO o.s.p.s.ScmUrlGuess - Found SCM type: git
        [sonar:sonar] 04:48:41.706 INFO org.sonar.INFO - Retrieve SCM blame information...
        [sonar:sonar] 04:48:42.472 INFO org.sonar.INFO - Retrieve SCM info for D:\GIT\XXX.cpp
        [sonar:sonar] 04:48:42.503 INFO .p.s.SonarScmManager - Executing: cmd.exe /X /C "git blame --porcelain XXX.cpp"
        etc
        [sonar:sonar] 04:49:20.237 INFO org.sonar.INFO - Retrieve SCM blame information done: 38531 ms
        [sonar:sonar] 04:49:20.331 INFO p.PhasesTimeProfiler - Sensor ScmActivitySensor done: 38625 ms

        then I am getting:
        org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter SCM URL or the <scm> section of Maven pom.
        at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
        at org.sonar.runner.Runner.execute(Runner.java:151)

        Caused by: org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter SCM URL or the <scm> section of Maven pom.
        at org.sonar.plugins.scmstats.UrlChecker.failure(UrlChecker.java:56)
        at org.sonar.plugins.scmstats.UrlChecker.check(UrlChecker.java:36)
        at org.sonar.plugins.scmstats.ScmStatsSensor.analyse(ScmStatsSensor.java:53)

        my URL is not blank as it was processed by SCM activitySensor.

        I even tried to disable the plugin for that project, still my build is failing, so I would need to uninstall the plugin for the whole system I guess, waiting for next release.

        Show
        stephane Renou added a comment - Hi Patroklos, Thanks for the quick feedback. I am using SCM release 1.5 I am still facing some issues on one project. sonar:sonar] 04:48:41.706 INFO p.PhasesTimeProfiler - Sensor ScmActivitySensor... [sonar:sonar] 04:48:41.706 INFO o.s.p.s.ScmUrlGuess - Trying to guess scm provider from project layout... [sonar:sonar] 04:48:41.706 INFO o.s.p.s.ScmUrlGuess - Found SCM type: git [sonar:sonar] 04:48:41.706 INFO org.sonar.INFO - Retrieve SCM blame information... [sonar:sonar] 04:48:42.472 INFO org.sonar.INFO - Retrieve SCM info for D:\GIT\XXX.cpp [sonar:sonar] 04:48:42.503 INFO .p.s.SonarScmManager - Executing: cmd.exe /X /C "git blame --porcelain XXX.cpp" etc [sonar:sonar] 04:49:20.237 INFO org.sonar.INFO - Retrieve SCM blame information done: 38531 ms [sonar:sonar] 04:49:20.331 INFO p.PhasesTimeProfiler - Sensor ScmActivitySensor done: 38625 ms then I am getting: org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter SCM URL or the <scm> section of Maven pom. at org.sonar.runner.Runner.delegateExecution(Runner.java:288) at org.sonar.runner.Runner.execute(Runner.java:151) Caused by: org.sonar.api.utils.SonarException: SCM URL must not be blank. Please check the parameter SCM URL or the <scm> section of Maven pom. at org.sonar.plugins.scmstats.UrlChecker.failure(UrlChecker.java:56) at org.sonar.plugins.scmstats.UrlChecker.check(UrlChecker.java:36) at org.sonar.plugins.scmstats.ScmStatsSensor.analyse(ScmStatsSensor.java:53) my URL is not blank as it was processed by SCM activitySensor. I even tried to disable the plugin for that project, still my build is failing, so I would need to uninstall the plugin for the whole system I guess, waiting for next release.
        Hide
        Papapetrou Patroklos added a comment -

        Your comment is related to SCMActivity plugin and your point is what I was writing earlier. That both plugins fail if you don't provide SCM URL. Since this issue is only for the SCM Stats plugin I'd suggest you to open a new ticket for the SCM Activity plugin or even better, send an email to the user mailing list.

        Show
        Papapetrou Patroklos added a comment - Your comment is related to SCMActivity plugin and your point is what I was writing earlier. That both plugins fail if you don't provide SCM URL. Since this issue is only for the SCM Stats plugin I'd suggest you to open a new ticket for the SCM Activity plugin or even better, send an email to the user mailing list.
        Hide
        stephane Renou added a comment -

        What I am trying to say is that in that sample SCMActivitySensor is working fine (the first part of my logs) and in that case I have a SCM url defined, but then my build fails in scmstats (second part of my logs).

        And it kept failing in scmstats even after I disabled the plugin for that project, I had to uninstall scmstats to get that job to build correctly.

        Show
        stephane Renou added a comment - What I am trying to say is that in that sample SCMActivitySensor is working fine (the first part of my logs) and in that case I have a SCM url defined, but then my build fails in scmstats (second part of my logs). And it kept failing in scmstats even after I disabled the plugin for that project, I had to uninstall scmstats to get that job to build correctly.

          People

          • Assignee:
            Papapetrou Patroklos
            Reporter:
            stephane Renou
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: