]> source.dussan.org Git - sonarqube.git/commitdiff
Merge remote-tracking branch 'origin/branch-5.0'
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 12 Jan 2015 11:22:23 +0000 (12:22 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 12 Jan 2015 11:22:23 +0000 (12:22 +0100)
Conflicts:
sonar-batch/src/main/java/org/sonar/batch/design/MavenDependenciesSensor.java

1  2 
sonar-batch/src/main/java/org/sonar/batch/design/MavenDependenciesSensor.java

index cd1698281f141482dd3179bd5e91f79997bb1de4,d0302398d87f246fa097e02952a5eb96dc5e4443..dfa42401400e64dba0dd84b80ec8d680ea5dcb3b
@@@ -233,14 -231,12 +233,14 @@@ public class MavenDependenciesSensor im
      }
    }
  
-   private Resource toResource(InputDependency dependency, SensorContext context) {
-     Project project = new Project(dependency.key());
-     Resource result = context.getResource(project);
+   private Resource toResource(Project project, InputDependency dependency, SensorContext context) {
+     Project depProject = new Project(dependency.key(), project.getBranch(), dependency.key());
+     Resource result = context.getResource(depProject);
      if (result == null || !((Project) result).getAnalysisVersion().equals(dependency.version())) {
-       Library lib = new Library(project.getKey(), dependency.version());
+       Library lib = new Library(dependency.key(), dependency.version());
 -      context.saveResource(lib);
 +      index.addResource(lib);
 +      // Temporary hack since we need snapshot id to persist dependencies
 +      resourcePersister.persist();
        result = context.getResource(lib);
      }
      return result;