Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None
    • Number of attachments :
      0

      Description

      This feature will be based on properties to define the multi-module structure.

      It should be possible to declare the following in the "sonar-project.properties" file:

      ...
      sonar.modules=mod1,mod2,mod3,mod4
      
      # a module has to redefine at least "sonar.projectName", as its key and its base directory has inferred from its identifier ('mod1' in this case)
      mod1.sonar.projectName=Module 1
      
      # but a module can obviously override properties 
      mod2.sonar.projectKey=org.company.mod2
      mod2.sonar.projectName=Module 2
      mod2.sonar.sources=java-sources
      
      # also, a module is not necessary located in a direct sub-folder
      mod3.sonar.projectBaseDir=modules/mod3
      mod3.sonar.projectName=Module 3
      ...
      

      It should be highlighted that the key of a module is automatically prefixed by the key of its parent followed by a semi-colon, in order to:

      • prevent duplicate key problems in Sonar
      • make it possible to analyse a module outside of its parent

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          For your tests Freddy, you can use the draft documentation located here: http://docs.codehaus.org/display/SONAR/Multi-module+support+for+Sonar+Runner

          Show
          Fabrice Bellingard added a comment - For your tests Freddy, you can use the draft documentation located here: http://docs.codehaus.org/display/SONAR/Multi-module+support+for+Sonar+Runner
          Hide
          Fabrice Bellingard added a comment -

          ITs added.

          Show
          Fabrice Bellingard added a comment - ITs added.
          Hide
          Freddy Mallet added a comment -

          Works well Fabrice, could you just integrate the two following improvements:

          • on module, by default the value of the sonar.projectName should be automatically deduced from the module key (similar to what is done with sonar.projectKey and sonar.projectBaseDir properties)
          • the working directory of module, should be located inside the working directory of the parent to prevent creating some ".sonar" working directory everywhere.
          Show
          Freddy Mallet added a comment - Works well Fabrice, could you just integrate the two following improvements: on module, by default the value of the sonar.projectName should be automatically deduced from the module key (similar to what is done with sonar.projectKey and sonar.projectBaseDir properties) the working directory of module, should be located inside the working directory of the parent to prevent creating some ".sonar" working directory everywhere.
          Hide
          Fabrice Bellingard added a comment -

          Modifications done.

          Show
          Fabrice Bellingard added a comment - Modifications done.
          Hide
          Fabrice Bellingard added a comment -

          ITs added.

          Show
          Fabrice Bellingard added a comment - ITs added.
          Hide
          Freddy Mallet added a comment -

          Manually tested !

          Show
          Freddy Mallet added a comment - Manually tested !
          Show
          Fabrice Bellingard added a comment - For further reference, the final documentation is here: http://docs.codehaus.org/display/SONAR/Analyzing+with+SonarQube+Runner#AnalyzingwithSonarQubeRunner-Multi-moduleProject

            People

            • Assignee:
              Fabrice Bellingard
              Reporter:
              Fabrice Bellingard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: