SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2264

Change the way to configure Sonar Ant Task

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ANT-TASK-2.0
    • Component/s: Ant Task
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In order to be consistent accross the different bootstrappers: starting with Sonar Ant Task 1.5, the standard way to configure the task will be through properties only (= the exact same way to configure the Sonar Runner, that will actually be embedded in the Ant Task).

      The old way will still be supported as a compatibility mode, but is bound to be removed in a near future. Everytime the task is run in compatibility mode, a warning message is logged to encourage users to update their scripts.

      Example of old way:

      ...
        <target name="sonar">
          <sonar:sonar key="my-project" version="0.1-SNAPSHOT">
            <property name="sources" value="src"/>
          </sonar:sonar>
        </target>
      ...
      

      New standard way:

      ...
        <property name="sonar.projectKey" value="my-project"/>
        <property name="sonar.projectName" value="My Project"/>
        <property name="sonar.projectVersion" value="0.1-SNAPSHOT"/>
        <property name="sonar.sources" value="src"/>
      ...
        <target name="sonar">
          <sonar:sonar />
        </target>
      ...
      

        Activity

        Hide
        Freddy Mallet added a comment -

        Manually tested !

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

        ITs migrated.

        Show
        Fabrice Bellingard added a comment - ITs migrated.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: