Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58438

Maven Multibranch Project sonar scan issue

XMLWordPrintable

      In maven multibranch project , while doing incremental build on the project , the build i sgood but the running sonar on top of that is not working fine.

      [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project XXXXX: Maven session does not declare a top level project -> [Help 1]

      Project Structure:

      Parent:

           ->pom.xml (having 2 modules - ModuleA and ModuleB)

               ModuleA

                     -->pom.xml

              ModuleB

                    --> pom.xml

       

      now i have tried incremental build so the command that gets executed for clean install is 

      pom.xml -amd -pl com.root.app:ModuleA clean install

      but when i try to run pom.xml -amd -pl com.root.app:ModuleA sonar:sonar

       

      it fails saying  Maven session does not declare a top level project -> [Help 1]
      [ERROR].

       

      How can i do sonar on incremental maven build.

            sonarteam Sonar Team
            sanderjoseph Sander Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: