use of org.sonar.maven.model.maven2.Profile in project sonar-java by SonarSource.
the class MavenDependencyCollector method fromProfiles.
private static List<Dependency> fromProfiles(@Nullable Profiles profiles) {
if (profiles != null) {
List<Dependency> results = new LinkedList<>();
for (Profile profile : profiles.getProfiles()) {
results.addAll(fromDependencyManagement(profile.getDependencyManagement()));
results.addAll(profile.getDependencies() != null ? profile.getDependencies().getDependencies() : Collections.<Dependency>emptyList());
results.addAll(fromBuild(profile.getBuild()));
}
return results;
}
return Collections.<Dependency>emptyList();
}
Aggregations