Reputation: 8644
I use SonarQube to analyze two Maven projects A and B with several modules each (only one displayed here):
projectA
`- someModule
projectB
Since I moved someModule from project A into project B, I get an error like this during the analysis:
Module "myGroupId:someModule" is already part of project "myGroupId:projectA"
Project A clearly does not contain 'someModule' anymore. It doesn't even show up as a component in the Sonar GUI after a new analysis, however it's still listed under 'Project Configuration > Update Key'.
How is it possible to delete such an obsolete component without deleting the entire project?
As a work-around I now renamed the key 'projectA:someModule' to 'projectA:someModuleThatShouldNotExist', but I hope someone can suggest a better solution...
Upvotes: 2
Views: 633
Reputation: 11
The linked issue which was created has been closed as "Won't Fix" so there is no solution to this other than deleting the original project.
This is really unfortunate as requiring deletion of the original project when you are trying to split it in phases but not update who knows how many dependent locations by retaining the original group/artifact names will result in the next scan of the original repo reflagging issues which may have been previously marked as "Won't fix" or similar status creating more noise and work for the sonar maintainers.
Upvotes: 1
Reputation: 26843
The status that you are describing is weird: if you have deleted "someModule" from project A and managed to analyze successfully this project in SonarQube, then it should not show up in the UI any longer and you should be able to analyze it within project B.
But as you can see this module in 'Project Configuration > Update Key', then you might have a workaround:
Upvotes: 3