aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-08-27 16:46:44 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-08-27 16:47:14 +0200
commit09f05d59b05849955dee633437c0814512fd0997 (patch)
treea4d756f988608dd53a23e5e88664e9a532a1fe4e /sonar-batch
parent2af85874240a994684de6837bbcdb6dd91497e3f (diff)
downloadsonarqube-09f05d59b05849955dee633437c0814512fd0997.tar.gz
sonarqube-09f05d59b05849955dee633437c0814512fd0997.zip
Fix regression caused by SONAR-5349
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorValidator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorValidator.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorValidator.java
index 67a226151d3..7b53b884b94 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorValidator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorValidator.java
@@ -25,6 +25,7 @@ import org.sonar.api.CoreProperties;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.bootstrap.ProjectReactor;
import org.sonar.api.config.Settings;
+import org.sonar.api.resources.Qualifiers;
import org.sonar.api.utils.SonarException;
import org.sonar.core.component.ComponentKeys;
import org.sonar.core.resource.ResourceDao;
@@ -88,8 +89,8 @@ public class ProjectReactorValidator {
// SONAR-4692 Validate root project is the same than previous analysis to avoid module with same key in different projects
String moduleKey = ComponentKeys.createKey(moduleDef.getKey(), branch);
ResourceDto rootInDB = resourceDao.getRootProjectByComponentKey(moduleKey);
- if (rootInDB == null) {
- // This is a new module so OK
+ if (rootInDB == null || Qualifiers.LIBRARY.equals(rootInDB.getQualifier())) {
+ // This is a new module or previously a library so OK
return;
}
if (rootInDB.getKey().equals(moduleKey)) {