private static List<Dependency> extractDependenciesFromModel(Model model) { List<Dependency> dependencies = new ArrayList<Dependency>(); for (org.apache.maven.model.Dependency mavenDependency : model .getDependencyManagement().getDependencies()) { List<Exclusion> exclusions = new ArrayList<Exclusion>(); for (org.apache.maven.model.Exclusion mavenExclusion : mavenDependency .getExclusions()) { exclusions.add(new Exclusion(mavenExclusion.getGroupId(), mavenExclusion.getArtifactId())); } Dependency dependency = new Dependency(mavenDependency.getGroupId(), mavenDependency.getArtifactId(), mavenDependency.getVersion(), exclusions); dependencies.add(dependency); } return dependencies; }