<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>
<!-- 配置 Sonar Host地址,默认:http://localhost:9000 -->
</sonar.host.url>
<sonar.login>
<!-- 配置 填写生成的tokne -->
</sonar.login>
</properties>
</profile>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.3.0.603</version>
</plugin>
mvn clean -DskipTests=true install org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar