简体   繁体   中英

Why does the SonarQube plugin for Eclipse use the “project name” instead of the “artifactID” to associate Maven projects with a SonarQube server?

For Maven multi-module projects, I have noticed that the plugin does the module association using the name of its directory inside the workspace , rather than using the artifactID contained inside the POM . Because of this, if I change the name of the project to anything else, I cannot longer run successful incremental analyses. How can I fix this (undesired) behaviour?

Once your Eclipse project is associated to a remote SonarQube project, changing its name should have no impact (association is a dedicated metadata).

By default when you try to associate an Eclipse project we use the project name to do the search. This is because we want to be independent from Maven and support any Eclipse project.

Using the SonarQube m2e connector may help since it will automatically try to associate your Maven project with a remote project having the key <groupId>:<artifactId> which is the default key for a Maven project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM