SonarQube Eclipse
  1. SonarQube Eclipse
  2. SONARIDE-316

Provide option to automatically activate the Sonar Nature when importing a Maven project with M2Eclipse

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: Configuration
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Manually activating the Sonar link on each project/module defined in an Eclipse workspace can be really tedious. Indeed, even if this is something which can be done through a bulk operation, each time a new project/module is added/replaced/renamed ... the is the responsibility of the developer to think about activating this Sonar link on those new projects/modules. Would be useful if the Sonar Eclipse could automatically take of that in the background.

        Issue Links

          Activity

          Hide
          Freddy Mallet added a comment -

          Manually tested !

          Show
          Freddy Mallet added a comment - Manually tested !
          Hide
          Freddy Mallet added a comment -

          @Julien, there is just one side effect : the list of violations are not loaded when this first association is done whereas this is the case when the association is done manually.

          So violations appear progressively as soon as a source file containing some violation is open.

          Show
          Freddy Mallet added a comment - @Julien, there is just one side effect : the list of violations are not loaded when this first association is done whereas this is the case when the association is done manually. So violations appear progressively as soon as a source file containing some violation is open.
          Hide
          Julien HENRY added a comment -

          Currently m2e connector is associating projects without any verification of their existence on the remote Sonar server. If we do a refresh it means there will be blocking error popup if the project has no match on the remote Sonar. It can be a problem when importing a lot of Maven projects at the same time (there will be a lot of error popup to close).
          Some proposals:

          • unconditionally set projects in local mode when activated by m2e. Let user the responsibility to switch to remote mode.
          • validate that project exists on remote Sonar when activated by m2e and then decide about local vs remote mode (use remote when project is found). If remote then refresh violations.
          • don't validate, associate in remote mode, then start refresh. Improve refresh job to display a meaningful message when there is no matching remote project
          Show
          Julien HENRY added a comment - Currently m2e connector is associating projects without any verification of their existence on the remote Sonar server. If we do a refresh it means there will be blocking error popup if the project has no match on the remote Sonar. It can be a problem when importing a lot of Maven projects at the same time (there will be a lot of error popup to close). Some proposals: unconditionally set projects in local mode when activated by m2e. Let user the responsibility to switch to remote mode. validate that project exists on remote Sonar when activated by m2e and then decide about local vs remote mode (use remote when project is found). If remote then refresh violations. don't validate, associate in remote mode, then start refresh. Improve refresh job to display a meaningful message when there is no matching remote project
          Hide
          Freddy Mallet added a comment -

          Ok, thanks for this explanation @Julien. In that case we're not going to change this default behavior :

          • When a Maven project is open -> the list of Sonar violations is not retrieved
          • As soon as a source file containing some violations is open, all related violations are loaded
          • At any point of time, a user has the ability to retrieve all violations on pending project by clicking on the "refresh" button in the Violations view
          Show
          Freddy Mallet added a comment - Ok, thanks for this explanation @Julien. In that case we're not going to change this default behavior : When a Maven project is open -> the list of Sonar violations is not retrieved As soon as a source file containing some violations is open, all related violations are loaded At any point of time, a user has the ability to retrieve all violations on pending project by clicking on the "refresh" button in the Violations view
          Hide
          Julien HENRY added a comment -

          IT added

          Show
          Julien HENRY added a comment - IT added

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Freddy Mallet
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: