Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-3979

Support Maven 3.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7
    • Component/s: None
    • Labels:
      None

      Description

      The following exception is thrown as soon as we try to use Maven 3.1

      iMac-de-Freddy:sonar-channel freddy$ mvn31 sonar:sonar -e
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Sonar :: Channel 3.3-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) @ sonar-channel ---
      [INFO] Sonar version: 3.3
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.934s
      [INFO] Finished at: Wed Nov 28 22:16:46 CET 2012
      [INFO] Final Memory: 14M/112M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project sonar-channel: Can not execute Sonar: org.slf4j.impl.SimpleLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project sonar-channel: Can not execute Sonar
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
      	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:310)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:146)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:211)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:156)
      	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:208)
      	... 19 more
      Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
      	at org.sonar.core.config.Logback.configure(Logback.java:67)
      	at org.sonar.core.config.Logback.configure(Logback.java:51)
      	at org.sonar.batch.bootstrapper.LoggingConfiguration.configure(LoggingConfiguration.java:116)
      	at org.sonar.batch.bootstrapper.Batch.configureLogging(Batch.java:66)
      	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)
      	at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142)
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
      	... 23 more
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: