Details

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

      Issue Links

        Activity

        Hide
        amliaison ea5ebb 80e1 added a comment - - edited

        Mark E. Scott Jr.: If the top-level/root name of the project is not unique, then I think there are bigger organizational problems and it can be dealt with as a one-off with overridden keys.

        Show
        amliaison ea5ebb 80e1 added a comment - - edited Mark E. Scott Jr. : If the top-level/root name of the project is not unique, then I think there are bigger organizational problems and it can be dealt with as a one-off with overridden keys.
        Hide
        julien.henry Julien Henry added a comment -

        Guys I decided to follow the safer way:

        • I assume root project group:name should be unique across projects
        • I assume module path is unique inside project

        So the key generation strategy will be:

        • [<group>:]<name> for root project
        • <root project key><module path> for other modules

        This is a breaking change since it will drop/create modules into all Gradle multi-module projects. So before updating the plugin people will have to use the key renaming feature of SonarQube prior to run a new analysis.

        Show
        julien.henry Julien Henry added a comment - Guys I decided to follow the safer way: I assume root project group:name should be unique across projects I assume module path is unique inside project So the key generation strategy will be: [<group>:] <name> for root project <root project key><module path> for other modules This is a breaking change since it will drop/create modules into all Gradle multi-module projects. So before updating the plugin people will have to use the key renaming feature of SonarQube prior to run a new analysis.
        Hide
        julien.henry Julien Henry added a comment -

        Mark E. Scott Jr. ea5ebb 80e1 Would you mind testing and providing fedback on RC1? It should fix your issues:
        https://groups.google.com/forum/#!topic/sonarqube/KtxlBda1SJs

        Show
        julien.henry Julien Henry added a comment - Mark E. Scott Jr. ea5ebb 80e1 Would you mind testing and providing fedback on RC1? It should fix your issues: https://groups.google.com/forum/#!topic/sonarqube/KtxlBda1SJs
        Hide
        amliaison ea5ebb 80e1 added a comment -

        Julien Henry:

        I tested three scenarios. All had correct and expected results.

        • 1.2 and workaround (see below)
        • 2.0-rc1 and workaround (see below)
        • 2.0-rc1 (no workaround)

        All the scenarios produced the same module keys!

        project structure
        structure:
          myproject/ (root project)
          myproject/foo/ (subproject/module)
          myproject/bar/ (subproject/module)
        
        workaround for 1.x
        subprojects { sonarqube { properties {
          property 'sonar.moduleKey', rootProject.group + ':' + rootProject.name + project.path
        } } }
        expected keys
        mygroup:myproject
        mygroup:myproject:foo
        mygroup:myproject:bar
        

        Thanks for everyone's work!

        Show
        amliaison ea5ebb 80e1 added a comment - Julien Henry : I tested three scenarios. All had correct and expected results. 1.2 and workaround (see below) 2.0-rc1 and workaround (see below) 2.0-rc1 (no workaround) All the scenarios produced the same module keys! project structure structure: myproject/ (root project) myproject/foo/ (subproject/module) myproject/bar/ (subproject/module) workaround for 1.x subprojects { sonarqube { properties { property 'sonar.moduleKey', rootProject.group + ':' + rootProject.name + project.path } } } expected keys mygroup:myproject mygroup:myproject:foo mygroup:myproject:bar Thanks for everyone's work!
        Hide
        julien.henry Julien Henry added a comment -

        Big thanks ea5ebb 80e1!

        Show
        julien.henry Julien Henry added a comment - Big thanks ea5ebb 80e1 !

          People

          • Assignee:
            julien.henry Julien Henry
            Reporter:
            julien.henry Julien Henry
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: