To activate the connection between Maven and SonarQube it is necessary to add  some information to (or create) the file "settings.xml", located in the ".m2" folder inside the home directory and namely:


<settings>

    <pluginGroups>

        <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>

    </pluginGroups>

    <profiles>

        <profile>

            <id>sonar</id>

            <activation>

                <activeByDefault>true</activeByDefault>

            </activation>

            <properties>

                <!-- Optional URL to server. Default value is http://localhost:9000 -->

                <sonar.host.url>

                  http://localhost:9000

                </sonar.host.url>

            </properties>

        </profile>

     </profiles>

</settings>



The example project "IocMaven" already contains properly written configuration files.