Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: Initial Clearing
    • Component/s: Analysis
    • Labels:
      None

      Description

      Isis was previously added to sonar (INFRA-3495), back when it was in the incubator and in SVN.

      Isis has since graduated and its source code is now in GIT.

      If git is supported in Sonar, then please update the SCM URL (to git.apache.org/isis.git).

      If git is not supported in Sonar, then please delete the Isis configuration.

      Please advise which was done.

        Activity

        Hide
        Gavin added a comment -
        Congrats, your first jenkins/sonar success for over a year!

        I changed the scm to point to git, changed the branch to use master, changed the pom to core/pom.xml.

        All passes now.

        https://analysis.apache.org/jenkins/job/isis/

        and

        https://analysis.apache.org/dashboard/index/org.apache.isis.core:isis

        Show
        Gavin added a comment - Congrats, your first jenkins/sonar success for over a year! I changed the scm to point to git, changed the branch to use master, changed the pom to core/pom.xml. All passes now. https://analysis.apache.org/jenkins/job/isis/ and https://analysis.apache.org/dashboard/index/org.apache.isis.core:isis
        Hide
        Dan Haywood added a comment -
        Sorry to reopen; could you build from the root pom, rather than core/pom.xml ?

        The alternative would be to request different builds for core and then each of the components that we have released (4 of them currently, though there will be more). It'd be easier for everyone, I think, just to have a single sonar build for the whole shebang.

        Also, I noticed on [https://analysis.apache.org/] that the old incubator build "Apache Isis" is still listed. Could this be removed?
        Show
        Dan Haywood added a comment - Sorry to reopen; could you build from the root pom, rather than core/pom.xml ? The alternative would be to request different builds for core and then each of the components that we have released (4 of them currently, though there will be more). It'd be easier for everyone, I think, just to have a single sonar build for the whole shebang. Also, I noticed on [ https://analysis.apache.org/ ] that the old incubator build "Apache Isis" is still listed. Could this be removed?
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -
        done
        Show
        Olivier Lamy (*$^¨%`£) added a comment - done
        Hide
        Dan Haywood added a comment -
        Sorry, what's been done?

        All I can see now on analysis.apache.org is the original old incubator config.

        Meanwhile, the configuration that Gav did seems to have gone.

        What I want is for analysis.apache.org to run the root pom.xml at git.apache.org/isis.git.
        Show
        Dan Haywood added a comment - Sorry, what's been done? All I can see now on analysis.apache.org is the original old incubator config. Meanwhile, the configuration that Gav did seems to have gone. What I want is for analysis.apache.org to run the root pom.xml at git.apache.org/isis.git.
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -
        Yup root pom is used.
        But: 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.
        So please add scm in your top pom.
        Show
        Olivier Lamy (*$^¨%`£) added a comment - Yup root pom is used. But: 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. So please add scm in your top pom.
        Hide
        Dan Haywood added a comment -
        OK, thx for that.

        Have just updated the pom and pushed to git.

        Can you kick off the build again to test?
        Show
        Dan Haywood added a comment - OK, thx for that. Have just updated the pom and pushed to git. Can you kick off the build again to test?
        Show
        Gavin added a comment - ran again, https://analysis.apache.org/jenkins/job/isis/263/console
        Hide
        Dan Haywood added a comment -
        OK so now (not being a sonar expert) I need your help.

        I added the scm/url to the pom.xml yesterday (see https://github.com/apache/isis/blob/master/pom.xml), but the console message says that it is blank.

        Can you advise as to the issue?

        Show
        Dan Haywood added a comment - OK so now (not being a sonar expert) I need your help. I added the scm/url to the pom.xml yesterday (see https://github.com/apache/isis/blob/master/pom.xml), but the console message says that it is blank. Can you advise as to the issue?
        Hide
        Gavin added a comment -
        Try a publically browsable url

        you have:

        <url>git://git.apache.org/isis.git&lt;/url>

        maybe try something like

        <url>https://git-wip-us.apache.org/repos/asf/isis.git&lt;/url> or <url>http://git.apache.org/isis.git&lt;/url>
        Show
        Gavin added a comment - Try a publically browsable url you have: <url> git://git.apache.org/isis.git&lt;/url > maybe try something like <url> https://git-wip-us.apache.org/repos/asf/isis.git&lt;/url > or <url> http://git.apache.org/isis.git&lt;/url >
        Hide
        Dan Haywood added a comment -
        Thank you ... needed a second pair of eyes there.

        Have done the update and pushed, will check again tomorrow.
        Show
        Dan Haywood added a comment - Thank you ... needed a second pair of eyes there. Have done the update and pushed, will check again tomorrow.
        Hide
        Dan Haywood added a comment -
        will check again tomorrow
        Show
        Dan Haywood added a comment - will check again tomorrow
        Hide
        Olivier Lamy (*$^¨%`£) added a comment - - edited
        a bit weird.
        Can you change to:

          <scm>
            <connection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git </connection>
            <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git </developerConnection>
            <url>https://git-wip-us.apache.org/repos/asf?p=isis.git </url>
          </scm>
        Show
        Olivier Lamy (*$^¨%`£) added a comment - - edited a bit weird. Can you change to:   <scm>     <connection>scm:git: https://git-wip-us.apache.org/repos/asf/isis.git </connection>     <developerConnection>scm:git: https://git-wip-us.apache.org/repos/asf/isis.git </developerConnection>     <url> https://git-wip-us.apache.org/repos/asf?p=isis.git </url>   </scm>
        Hide
        Dan Haywood added a comment -
        Hi Olivier,

        I think that Gav has set me right... when it ran last night the url was set to <url>git:/...</url>. As Gav said in his comment, I need a publically accessible URL.

        I've made the change to the read-only git repo (http://git.apache.org/isis.git) and the commit, but (I presume) that it hasn't yet run.

        I'll look at it again tomorrow; if it is still failling then I'll try your suggestion of using the read-write repo.

        Thx
        Dan
        Show
        Dan Haywood added a comment - Hi Olivier, I think that Gav has set me right... when it ran last night the url was set to <url>git:/...</url>. As Gav said in his comment, I need a publically accessible URL. I've made the change to the read-only git repo ( http://git.apache.org/isis.git ) and the commit, but (I presume) that it hasn't yet run. I'll look at it again tomorrow; if it is still failling then I'll try your suggestion of using the read-write repo. Thx Dan
        Show
        Olivier Lamy (*$^¨%`£) added a comment - No <url> must contains a human browsable url That's the case of https://git-wip-us.apache.org/repos/asf?p=isis.git and NOT for http://git.apache.org/isis.git We use that for maven projects on git and it works. See : * https://git-wip-us.apache.org/repos/asf?p=maven-wagon.git;a=blob_plain;f=pom.xml;hb=master * https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob_plain;f=pom.xml;hb=master * etc..
        Hide
        Dan Haywood added a comment -
        I see.

        In which case, I've just changed the URL to the r/o URL, and pushed the change.

        Many thanks
        Dan
        Show
        Dan Haywood added a comment - I see. In which case, I've just changed the URL to the r/o URL, and pushed the change. Many thanks Dan
        Hide
        #asfinfra IRC Bot added a comment -
        <pctony> All done.
        Show
        #asfinfra IRC Bot added a comment - <pctony> All done.
        Hide
        Dan Haywood added a comment -
        Sorry to re-open once again, but analysis.apache.org still isn't showing this as having run successfully.

        Per olamy's advice yesterday, the scm url in the root pom is now the r/w repo see [1]

        Presumably there's an error in the jenkins console somewhere (I don't know how to access that to check).

        [1] https://github.com/apache/isis/blob/master/pom.xml
        Show
        Dan Haywood added a comment - Sorry to re-open once again, but analysis.apache.org still isn't showing this as having run successfully. Per olamy's advice yesterday, the scm url in the root pom is now the r/w repo see [1] Presumably there's an error in the jenkins console somewhere (I don't know how to access that to check). [1] https://github.com/apache/isis/blob/master/pom.xml
        Hide
        Gavin added a comment -
        The build itself passed, but Sonar doesnt like something:

        [INFO] Apache Isis (Aggregator) .......................... FAILURE [12:42.513s]
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 12:56.854s
        [INFO] Finished at: Thu Feb 14 23:36:54 UTC 2013
        [INFO] Final Memory: 62M/290M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: Can not execute Sonar: Fail to decorate 'org.sonar.api.resources.Project@44f6de97[id=127645,key=org.apache.isis.core:isis,qualifier=BRC]': Measure value can not be NaN -> [Help 1]
        org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: 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:320)
        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 decorate 'org.sonar.api.resources.Project@44f6de97[id=127645,key=org.apache.isis.core:isis,qualifier=BRC]'
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:84)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70)
        at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:55)
        at org.sonar.batch.phases.Phases.execute(Phases.java:92)
        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:129)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:147)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:141)
        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:136)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:83)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:75)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60)
        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
        ... 23 more
        Caused by: java.lang.IllegalArgumentException: Measure value can not be NaN
        at org.sonar.api.measures.Measure.setValue(Measure.java:278)
        at org.sonar.api.measures.Measure.setValue(Measure.java:250)
        at org.sonar.api.measures.Measure.<init>(Measure.java:83)
        at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:117)
        at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.saveCyclicityMeasures(SonargraphDerivedMetricsDecorator.java:144)
        at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.decorate(SonargraphDerivedMetricsDecorator.java:87)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79)
        ... 38 more
        [ERROR]
        [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/MojoExecutionException
        [ERROR]
        [ERROR] After correcting the problems, you can resume the build with the command
        [ERROR] mvn <goals> -rf :isis-all
        Sonar analysis completed: FAILURE
        Build step 'Sonar' changed build result to FAILURE
        Build step 'Sonar' marked build as failure
        Finished: FAILURE
        Show
        Gavin added a comment - The build itself passed, but Sonar doesnt like something: [INFO] Apache Isis (Aggregator) .......................... FAILURE [12:42.513s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12:56.854s [INFO] Finished at: Thu Feb 14 23:36:54 UTC 2013 [INFO] Final Memory: 62M/290M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: Can not execute Sonar: Fail to decorate ' org.sonar.api.resources.Project@44f6de97 [id=127645,key=org.apache.isis.core:isis,qualifier=BRC]': Measure value can not be NaN -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: 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:320) 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 decorate ' org.sonar.api.resources.Project@44f6de97 [id=127645,key=org.apache.isis.core:isis,qualifier=BRC]' at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:84) at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70) at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:55) at org.sonar.batch.phases.Phases.execute(Phases.java:92) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:129) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:147) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:141) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:136) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:83) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:75) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60) at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113) ... 23 more Caused by: java.lang.IllegalArgumentException: Measure value can not be NaN at org.sonar.api.measures.Measure.setValue(Measure.java:278) at org.sonar.api.measures.Measure.setValue(Measure.java:250) at org.sonar.api.measures.Measure.<init>(Measure.java:83) at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:117) at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.saveCyclicityMeasures(SonargraphDerivedMetricsDecorator.java:144) at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.decorate(SonargraphDerivedMetricsDecorator.java:87) at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79) ... 38 more [ERROR] [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/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :isis-all Sonar analysis completed: FAILURE Build step 'Sonar' changed build result to FAILURE Build step 'Sonar' marked build as failure Finished: FAILURE
        Hide
        Dan Haywood added a comment -
        In which case, perhaps we should solve this some other way.

        Some of the stuff that we're trying to build from the root pom (./pom.xml) isn't yet released and might never be. So rather than struggle with that, perhaps we should just set up separate jobs for the components that are released.

        Gav, you remember the first thing you did was to configure Sonar to run our core module (core/pom.xml). This worked fine.

        Could I therefore redefine this ticket as follows:
        * remove the build for ./pom.xml (ie this one, that's failing)
        * add new build for core/pom.xml (ie, that we had a while back)
        * add additional new builds for:
          - component/objectstore/jdo/pom.xml
          - component/security/file/pom.xml
          - component/security/shiro/pom.xml
          - component/viewer/wicket/pom.xml
          - component/viewer/restfulobjects/pom.xml

        If we release new components, we'll just raise a new ticket for those components.

        Hopefully that's not too much work?
        Show
        Dan Haywood added a comment - In which case, perhaps we should solve this some other way. Some of the stuff that we're trying to build from the root pom (./pom.xml) isn't yet released and might never be. So rather than struggle with that, perhaps we should just set up separate jobs for the components that are released. Gav, you remember the first thing you did was to configure Sonar to run our core module (core/pom.xml). This worked fine. Could I therefore redefine this ticket as follows: * remove the build for ./pom.xml (ie this one, that's failing) * add new build for core/pom.xml (ie, that we had a while back) * add additional new builds for:   - component/objectstore/jdo/pom.xml   - component/security/file/pom.xml   - component/security/shiro/pom.xml   - component/viewer/wicket/pom.xml   - component/viewer/restfulobjects/pom.xml If we release new components, we'll just raise a new ticket for those components. Hopefully that's not too much work?
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -
        too much maintenance for us with such solution.
        Can you simply add a sonar module with only a pom containing modules you want to analyse. (as it you will control yourself which modules you want to see in sonar)
        Show
        Olivier Lamy (*$^¨%`£) added a comment - too much maintenance for us with such solution. Can you simply add a sonar module with only a pom containing modules you want to analyse. (as it you will control yourself which modules you want to see in sonar)
        Hide
        Dan Haywood added a comment -
        As per Olivier's preference, I've updated the root pom so that it has a Maven profile called 'sonar' that selects the modules for which analysis should be run.

        As per usual with Maven, it can be selected by passing in -P sonar

        Obviously I can't test this, but hopefully it won't take you a minute to apply the change so we can see what happens...

        Show
        Dan Haywood added a comment - As per Olivier's preference, I've updated the root pom so that it has a Maven profile called 'sonar' that selects the modules for which analysis should be run. As per usual with Maven, it can be selected by passing in -P sonar Obviously I can't test this, but hopefully it won't take you a minute to apply the change so we can see what happens...
        Hide
        Gavin added a comment -
        Show
        Gavin added a comment - Tested: https://analysis.apache.org/jenkins/job/isis/281/console Please advise, thanks
        Hide
        Dan Haywood added a comment -
        That didn't seem to work... for whatever reason, it ran all the modules rather than just the ones in the profile.

        Look, let's go back to the very first thing you did... which was to set up analysis just on core. That did work (build #257), and constitutes the majority of the code we ought to analyse.

        Therefore:
        - change the build to run "core/pom.xml"
        - also, can you clean up the old "0.1.2-incubating-SNAPSHOT" job that is shown on the "https://analysis.apache.org/"

        Thx
        Dan
        Show
        Dan Haywood added a comment - That didn't seem to work... for whatever reason, it ran all the modules rather than just the ones in the profile. Look, let's go back to the very first thing you did... which was to set up analysis just on core. That did work (build #257), and constitutes the majority of the code we ought to analyse. Therefore: - change the build to run "core/pom.xml" - also, can you clean up the old "0.1.2-incubating-SNAPSHOT" job that is shown on the " https://analysis.apache.org/ " Thx Dan
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -
        Looks to be a Sonar issue:
        {code}
        [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: Can not execute Sonar: Fail to decorate 'org.sonar.api.resources.Project@2422caf0[id=127645,key=org.apache.isis.core:isis,qualifier=BRC]': Measure value can not be NaN -> [Help 1]
        org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: 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:320)
        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 decorate 'org.sonar.api.resources.Project@2422caf0[id=127645,key=org.apache.isis.core:isis,qualifier=BRC]'
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:84)
        at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70)
        at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:55)
        at org.sonar.batch.phases.Phases.execute(Phases.java:92)
        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:129)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:147)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:141)
        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:136)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:83)
        at org.sonar.batch.bootstrap.Module.start(Module.java:68)
        at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:75)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60)
        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
        ... 23 more
        Caused by: java.lang.IllegalArgumentException: Measure value can not be NaN
        at org.sonar.api.measures.Measure.setValue(Measure.java:278)
        at org.sonar.api.measures.Measure.setValue(Measure.java:250)
        at org.sonar.api.measures.Measure.<init>(Measure.java:83)
        at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:117)
        at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.saveCyclicityMeasures(SonargraphDerivedMetricsDecorator.java:144)
        at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.decorate(SonargraphDerivedMetricsDecorator.java:87)
        at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79)
        ... 38 more
        {code}
        Show
        Olivier Lamy (*$^¨%`£) added a comment - Looks to be a Sonar issue: {code} [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: Can not execute Sonar: Fail to decorate ' org.sonar.api.resources.Project@2422caf0 [id=127645,key=org.apache.isis.core:isis,qualifier=BRC]': Measure value can not be NaN -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project isis-all: 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:320) 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 decorate ' org.sonar.api.resources.Project@2422caf0 [id=127645,key=org.apache.isis.core:isis,qualifier=BRC]' at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:84) at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70) at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:55) at org.sonar.batch.phases.Phases.execute(Phases.java:92) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:129) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:147) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:141) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:136) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:83) at org.sonar.batch.bootstrap.Module.start(Module.java:68) at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:75) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60) at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113) ... 23 more Caused by: java.lang.IllegalArgumentException: Measure value can not be NaN at org.sonar.api.measures.Measure.setValue(Measure.java:278) at org.sonar.api.measures.Measure.setValue(Measure.java:250) at org.sonar.api.measures.Measure.<init>(Measure.java:83) at org.sonar.batch.DefaultDecoratorContext.saveMeasure(DefaultDecoratorContext.java:117) at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.saveCyclicityMeasures(SonargraphDerivedMetricsDecorator.java:144) at com.hello2morrow.sonarplugin.decorator.SonargraphDerivedMetricsDecorator.decorate(SonargraphDerivedMetricsDecorator.java:87) at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79) ... 38 more {code}
        Show
        Olivier Lamy (*$^¨%`£) added a comment - see http://jira.codehaus.org/browse/SONAR-4186
        Hide
        Dan Haywood added a comment -
        Indeed, I noticed that.

        Nevertheless, it did work when we ran against just core/pom.xml (build #257). So, as requested, can you just configure it to run that (as well as removing the stale "0.1.2-incubating-SNAPSHOT" entry that's still there on http;//analysis.apache.org from ages ago)

        Dan
        Show
        Dan Haywood added a comment - Indeed, I noticed that. Nevertheless, it did work when we ran against just core/pom.xml (build #257). So, as requested, can you just configure it to run that (as well as removing the stale "0.1.2-incubating-SNAPSHOT" entry that's still there on http;//analysis.apache.org from ages ago) Dan
        Hide
        Dan Haywood added a comment -
        Per the SONAR-4186 that you've raised, I notice that the command line that you've quoted does not include the -P sonar flag (to activate the "sonar" profile) that I requested a few comments back.

        So although there's undoubtedly a problem with Sonar here, it is possible that running the analysis from ./pom.xml but with the -P sonar flag might also work (rather than just running analysis on core/pom.xml).

        If it is possible to pass in the profile flag, perhaps try that first? If that doesn't work, then just run core/pom.xml.
        Show
        Dan Haywood added a comment - Per the SONAR-4186 that you've raised, I notice that the command line that you've quoted does not include the -P sonar flag (to activate the "sonar" profile) that I requested a few comments back. So although there's undoubtedly a problem with Sonar here, it is possible that running the analysis from ./pom.xml but with the -P sonar flag might also work (rather than just running analysis on core/pom.xml). If it is possible to pass in the profile flag, perhaps try that first? If that doesn't work, then just run core/pom.xml.
        Hide
        Gavin added a comment -
        I definatly ran https://analysis.apache.org/jenkins/job/isis/281/console with -Psonar and -P sonar (I didnt know which one).

        The confuration is currently:

        clean install -U -DskipTests -fae -Psonar -P!default

        I'll give it one more test now then revert to the last working config if it fails.
        Show
        Gavin added a comment - I definatly ran https://analysis.apache.org/jenkins/job/isis/281/console with -Psonar and -P sonar (I didnt know which one). The confuration is currently: clean install -U -DskipTests -fae -Psonar -P!default I'll give it one more test now then revert to the last working config if it fails.
        Hide
        Gavin added a comment -
        Ran it with -P sonar and without, using the old core/pom.xml that passed previously.
        Both failed this time with seemingly the same error.

        Dan, I think we should give you temporary access of the config so you can tweak/run it yourself until you are happy ?
        Show
        Gavin added a comment - Ran it with -P sonar and without, using the old core/pom.xml that passed previously. Both failed this time with seemingly the same error. Dan, I think we should give you temporary access of the config so you can tweak/run it yourself until you are happy ?
        Hide
        Dan Haywood added a comment -
        OK, I'm happy with that if you are.
        Show
        Dan Haywood added a comment - OK, I'm happy with that if you are.
        Hide
        Gavin added a comment -
        details sent vis email, will check in the morning how you got on.
        Show
        Gavin added a comment - details sent vis email, will check in the morning how you got on.
        Hide
        Dan Haywood added a comment -
        Gav,
        I logged on using the credentials but didn't have permissions to configure the build.

        Nevertheless, I did some more googling, I uncovered: http://jira.codehaus.org/browse/SONARPLUGINS-2732, which looks very similar to the error we are seeing in https://analysis.apache.org/jenkins/job/isis/289/consoleText, I wonder whether Sonar is failing when it tries to process the parent "Isis Core" pom (that has no source code/packages in it)?

        So, what version of this plugin are we at? Perhaps an upgrade might fix things?

        Dan

        Show
        Dan Haywood added a comment - Gav, I logged on using the credentials but didn't have permissions to configure the build. Nevertheless, I did some more googling, I uncovered: http://jira.codehaus.org/browse/SONARPLUGINS-2732, which looks very similar to the error we are seeing in https://analysis.apache.org/jenkins/job/isis/289/consoleText, I wonder whether Sonar is failing when it tries to process the parent "Isis Core" pom (that has no source code/packages in it)? So, what version of this plugin are we at? Perhaps an upgrade might fix things? Dan
        Hide
        Dan Haywood added a comment -
        ps: if running core/pom.xml, you should NOT specify the -P sonar flag. (I introduced that as an attempt to run from ./pom.xml; as the console text says, there is no "sonar" profile for core).
        Show
        Dan Haywood added a comment - ps: if running core/pom.xml, you should NOT specify the -P sonar flag. (I introduced that as an attempt to run from ./pom.xml; as the console text says, there is no "sonar" profile for core).
        Hide
        Dan Haywood added a comment -
        Looking at analysis.apache.org this morning, it looks like the "Apache Isis core" results are there.

        I don't know if the jenkins job is still indicating a failure, but I don't really care if the analysis is getting published.

        I did notice though that the old incubator entry "Apache Isis" (without the "core" suffix) is still listed on the analysis.apache.org site.

        So, if you could just clear that up somehow, I'd be happy for us to (finally!) close this ticket?

        Thx
        Dan
        Show
        Dan Haywood added a comment - Looking at analysis.apache.org this morning, it looks like the "Apache Isis core" results are there. I don't know if the jenkins job is still indicating a failure, but I don't really care if the analysis is getting published. I did notice though that the old incubator entry "Apache Isis" (without the "core" suffix) is still listed on the analysis.apache.org site. So, if you could just clear that up somehow, I'd be happy for us to (finally!) close this ticket? Thx Dan
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -
        As we use -f core/pom.xml the name in the dashboard come from the pom so Isis core looks good :-)
        Maybe add a property in your pom <sonar.projectName>Apache Isis</sonar.projectName>
        Show
        Olivier Lamy (*$^¨%`£) added a comment - As we use -f core/pom.xml the name in the dashboard come from the pom so Isis core looks good :-) Maybe add a property in your pom <sonar.projectName>Apache Isis</sonar.projectName>
        Hide
        Dan Haywood added a comment -
        OK, I'm gonna close this ticket now. Think we got there in the end.
        Thx,
        Dan
        Show
        Dan Haywood added a comment - OK, I'm gonna close this ticket now. Think we got there in the end. Thx, Dan

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Review Date:

              Development