sonarqube docking with maven

1. Modify maven's settings.xml

Add the following code in the profile

        <profile>
                  <id>sonar</id>
                  <activation>
                          <activeByDefault>true</activeByDefault>
                  </activation>
                  <properties>
                        <sonar.login>admin</sonar.login>
                        <sonar.password>sonar网页密码</sonar.password>
                        <sonar.host.url>http://sonar网页IP:9000</sonar.host.url>
                        <sonar.inclusions>**/*.java,**/*.xml</sonar.inclusions>
                  </properties>
        </profile>

Add the following code in activeProfiles

    <activeProfile>sonar</activeProfile>

Finally, execute the following commands in java of maven architecture. After running, you can see that there are data on the webpage:

 mvn clean install sonar:sonar

 

Guess you like

Origin blog.csdn.net/zetion_3/article/details/113352681