1
votes

I analyzed a project and then deleted it throught SonarQube web interface. This is on a fresh installation of SonarQube 5.1.2.

In the web interface I can no longer see any projects.

When I run mvn sonar:sonar analysis fails with message similar to

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project myproject: Module "somesubmodule" is already part of project "myotherprojectkey"

So I think what happens is that in a multi-module Maven project, project deletion through web interface will only delete the top-level module as a project. All other lower level modules will remain in the database preventing code analysis.

These "projects" cannot be deleted through the web interface because they are invisible.

I check the database and it is true that the projects table is not empty at all.

Is there a way to purge the database from project data in a consistent way?

I don't want to reinstall SonarQube just for the sake of removing a project.

1

1 Answers

4
votes

sub-modules should be properly deleted but for the sake of it you could check for ghost data under Settings - System - Bulk Deletion.

You could also query the api/projects/index?subprojects=true WebService to check if somesubmodule appears somewhere.