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

Maven plugin throws a org.apache.maven.BuildFailureException: Compilation failure : when I launch maven sonar plugin from the reactor project

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.4.1
    • Component/s: Maven Plugin
    • Labels:
      None
    • Environment:
      linux red had 4

      Description

      I have a project and a reactor project.

      When I launch sonar maven plugin from the project, everything goes right.

      When I launch sonar maven plugin from a reactor project, I have a error : Compilation failure

      It is quite problematic because, I made a reactor pom for every application with several projects, because as you know, you can't yet have aggregate project.

      I let you the error.

      [INFO] Compiling 10 source files to /export/home/frtdevxpp/quickbuild-1.2.12/working/root/TradingTools/DominoSP/NBuildSonar/checkouts/Nightly/DominoSP/montageutils/target/test-classes
      [ERROR] Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.4.1:install
      org.apache.maven.BuildFailureException: Compilation failure
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:924)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:529)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at ch.hortis.sonar.mvn.SonarMavenEmbedder.execute(SonarMavenEmbedder.java:151)
      at ch.hortis.sonar.mvn.SonarMojo.executeMaven(SonarMojo.java:248)
      at ch.hortis.sonar.mvn.SonarMojo.executeGoals(SonarMojo.java:231)
      at ch.hortis.sonar.mvn.SonarMojo.execute(SonarMojo.java:116)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
      at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:102)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      ... 31 more
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.4.1:install

      Embedded error: Compilation failure
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.4.1:install
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.4.1:install
      at ch.hortis.sonar.mvn.SonarMojo.executeMaven(SonarMojo.java:252)
      at ch.hortis.sonar.mvn.SonarMojo.executeGoals(SonarMojo.java:231)
      at ch.hortis.sonar.mvn.SonarMojo.execute(SonarMojo.java:116)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      ... 16 more
      Caused by: org.apache.maven.BuildFailureException: Compilation failure
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:924)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:529)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at ch.hortis.sonar.mvn.SonarMavenEmbedder.execute(SonarMavenEmbedder.java:151)
      at ch.hortis.sonar.mvn.SonarMojo.executeMaven(SonarMojo.java:248)
      ... 20 more
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
      at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:102)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      ... 31 more

        Activity

        Hide
        simon.brandhof Simon Brandhof added a comment - - edited

        Alexandre, multi-modules projects should work within sonar. Could you check that the maven property -Dsonar.skipInstall is not set ?

        Show
        simon.brandhof Simon Brandhof added a comment - - edited Alexandre, multi-modules projects should work within sonar. Could you check that the maven property -Dsonar.skipInstall is not set ?
        Hide
        schumnana Alexandre Navarro added a comment -

        In fact, add -Dsonar.skipInstall does not work.
        I try on another environnement (a windows) and it works.
        I think I found what is the problem. Your plugin might have some dependencies in SNAPSHOT, when I launched with -U, it works.

        I think you might have only fixed dependencies for a sonar released plugin version.

        I will add temporarily a -U before sonar plugin in waiting the next version.

        Show
        schumnana Alexandre Navarro added a comment - In fact, add -Dsonar.skipInstall does not work. I try on another environnement (a windows) and it works. I think I found what is the problem. Your plugin might have some dependencies in SNAPSHOT, when I launched with -U, it works. I think you might have only fixed dependencies for a sonar released plugin version. I will add temporarily a -U before sonar plugin in waiting the next version.
        Hide
        schumnana Alexandre Navarro added a comment -

        You can close the bug

        Show
        schumnana Alexandre Navarro added a comment - You can close the bug
        Hide
        simon.brandhof Simon Brandhof added a comment -

        Thanks alexandre. We're going to update our faq.

        Show
        simon.brandhof Simon Brandhof added a comment - Thanks alexandre. We're going to update our faq.

          People

          • Assignee:
            simon.brandhof Simon Brandhof
            Reporter:
            schumnana Alexandre Navarro
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: