SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-1048

Error when instrumenting Google Web Toolkit project

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Clover
    • Labels:
      None
    • Number of attachments :
      1

      Description

      When executing sonar against a GWT project, GWT is unable to compile. I have verified that we are using the correct GWT plugin that was mentioned in the link to this reported issue in the Sonar FAQs. I have attached the output from our Maven build.

        Issue Links

          Activity

          Hide
          Scott Wolk added a comment -

          We use clover as well and this issue is pretty important. Clover and gwt-maven-plugin work together, but when sonar is introduced it doesn't work: http://confluence.atlassian.com/display/CLOVER/Using+Clover+with+the+GWT-maven+plugin

          Show
          Scott Wolk added a comment - We use clover as well and this issue is pretty important. Clover and gwt-maven-plugin work together, but when sonar is introduced it doesn't work: http://confluence.atlassian.com/display/CLOVER/Using+Clover+with+the+GWT-maven+plugin
          Hide
          Scott Wolk added a comment -

          That russian blog helped. I was able to generate the code coverage and it seems all the metrics made it into sonar server, but I still get a build failure:
          [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project app-cb-gwt: GWT Module Empty.gwt.xml not found in project sources or resources. -> [Help 1]
          org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project app-cb-gwt: GWT Module Empty.gwt.xml not found in project sources or resources.

          This is when running 'mvn -e -PSonar sonar:sonar'. Does anyone know how to resolve this?

          Thanks,
          Scott

          Show
          Scott Wolk added a comment - That russian blog helped. I was able to generate the code coverage and it seems all the metrics made it into sonar server, but I still get a build failure: [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project app-cb-gwt: GWT Module Empty.gwt.xml not found in project sources or resources. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project app-cb-gwt: GWT Module Empty.gwt.xml not found in project sources or resources. This is when running 'mvn -e -PSonar sonar:sonar'. Does anyone know how to resolve this? Thanks, Scott
          Hide
          Scott Wolk added a comment -

          Figured it out. The empty module name to refer to is just 'Empty', not 'Empty.gwt.xml' as specified in the blog. Still it would be nice if this could be fixed.

          Show
          Scott Wolk added a comment - Figured it out. The empty module name to refer to is just 'Empty', not 'Empty.gwt.xml' as specified in the blog. Still it would be nice if this could be fixed.
          Hide
          Marek Parfianowicz added a comment -

          Hi,

          Please note that Clover is based on source code instrumentation, while Cobertura/Emma relies on bytecode instrumentation. As GWT framework is trying to translate client-side sources into a javascript it fails as soon as it encounters Clover class calls in code. A workaround is to limit instrumentation to server-side code only or to disable GWT translation into java script. You can find more details on updated page: https://confluence.atlassian.com/display/CLOVER/Using+Clover+with+the+GWT-maven+plugin

          Regards
          Marek

          Show
          Marek Parfianowicz added a comment - Hi, Please note that Clover is based on source code instrumentation, while Cobertura/Emma relies on bytecode instrumentation. As GWT framework is trying to translate client-side sources into a javascript it fails as soon as it encounters Clover class calls in code. A workaround is to limit instrumentation to server-side code only or to disable GWT translation into java script. You can find more details on updated page: https://confluence.atlassian.com/display/CLOVER/Using+Clover+with+the+GWT-maven+plugin Regards Marek
          Hide
          Freddy Mallet added a comment -

          Won't fix due to SONARPLUGINS-3484

          Show
          Freddy Mallet added a comment - Won't fix due to SONARPLUGINS-3484

            People

            • Assignee:
              Unassigned
              Reporter:
              Andrew Phillips
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: