@Test public void testGetAllDependenciesOfAnEmptyModule(){ final Module module = DataModelFactory.createModule("module1", "1.0.0-SNAPSHOT"); final List<Dependency> dependencies = ModuleUtils.getAllDependencies(module); assertNotNull(dependencies); assertEquals(0, dependencies.size()); }
public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifact.getGavc()); } dependencies.addAll(getAllDependencies(module, producedArtifacts)); return new ArrayList<Dependency>(dependencies); }
ModuleUtils { public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifact.getGavc()); } dependencies.addAll(getAllDependencies(module, producedArtifacts)); return new ArrayList<Dependency>(dependencies); } }
ModuleUtils { public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifact.getGavc()); } dependencies.addAll(getAllDependencies(module, producedArtifacts)); return new ArrayList<Dependency>(dependencies); } private  ModuleUtils(); }
ModuleUtils { public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifact.getGavc()); } dependencies.addAll(getAllDependencies(module, producedArtifacts)); return new ArrayList<Dependency>(dependencies); } private  ModuleUtils(); static List<Artifact> getAllArtifacts(final Module module); static List<Dependency> getAllDependencies(final Module module); static Set<Dependency> getAllDependencies(final Module module, final List<String> producedArtifacts); static List<Dependency> getCorporateDependencies(final Module module, final List<String> corporateFilters); static List<Dependency> getThirdPartyLibraries(final Module module, final List<String> corporateFilters); }
ModuleUtils { public static List<Dependency> getAllDependencies(final Module module) { final Set<Dependency> dependencies = new HashSet<Dependency>(); final List<String> producedArtifacts = new ArrayList<String>(); for(final Artifact artifact: getAllArtifacts(module)){ producedArtifacts.add(artifact.getGavc()); } dependencies.addAll(getAllDependencies(module, producedArtifacts)); return new ArrayList<Dependency>(dependencies); } private  ModuleUtils(); static List<Artifact> getAllArtifacts(final Module module); static List<Dependency> getAllDependencies(final Module module); static Set<Dependency> getAllDependencies(final Module module, final List<String> producedArtifacts); static List<Dependency> getCorporateDependencies(final Module module, final List<String> corporateFilters); static List<Dependency> getThirdPartyLibraries(final Module module, final List<String> corporateFilters);  }