@Test public void walkGroupHavingSubgroup() throws IOException { final GavSet gavSet = GavSet.builder() .include("org.group1") .build(); Collector c = new Collector() .expect("org.group1:artifact1:1.2.3:jar", "org/group1/artifact1/1.2.3/artifact1-1.2.3.jar") .expect("org.group1:artifact1:1.2.3:pom", "org/group1/artifact1/1.2.3/artifact1-1.2.3.pom") ; new GavSetWalker(LOCAL_MAVEN_REPO_ROOT_DIR, gavSet, "1.2.3").walk(c); c.assertExpected(); }
public void walk(Consumer<GavtcPath> callback) throws IOException { FileVisitor<Path> visitor = new GavtcPathVisitor(localMavenRepoRoot, gavSet, version, callback); for (Path path : subtrees) { final Path start = localMavenRepoRoot.resolve(path).normalize(); if (Files.exists(start)) { Files.walkFileTree(start, visitor); } } }
GavSetWalker { public void walk(Consumer<GavtcPath> callback) throws IOException { FileVisitor<Path> visitor = new GavtcPathVisitor(localMavenRepoRoot, gavSet, version, callback); for (Path path : subtrees) { final Path start = localMavenRepoRoot.resolve(path).normalize(); if (Files.exists(start)) { Files.walkFileTree(start, visitor); } } } }
GavSetWalker { public void walk(Consumer<GavtcPath> callback) throws IOException { FileVisitor<Path> visitor = new GavtcPathVisitor(localMavenRepoRoot, gavSet, version, callback); for (Path path : subtrees) { final Path start = localMavenRepoRoot.resolve(path).normalize(); if (Files.exists(start)) { Files.walkFileTree(start, visitor); } } } GavSetWalker(Path localMavenRepoRoot, GavSet gavSet, String version); }
GavSetWalker { public void walk(Consumer<GavtcPath> callback) throws IOException { FileVisitor<Path> visitor = new GavtcPathVisitor(localMavenRepoRoot, gavSet, version, callback); for (Path path : subtrees) { final Path start = localMavenRepoRoot.resolve(path).normalize(); if (Files.exists(start)) { Files.walkFileTree(start, visitor); } } } GavSetWalker(Path localMavenRepoRoot, GavSet gavSet, String version); void walk(Consumer<GavtcPath> callback); }
GavSetWalker { public void walk(Consumer<GavtcPath> callback) throws IOException { FileVisitor<Path> visitor = new GavtcPathVisitor(localMavenRepoRoot, gavSet, version, callback); for (Path path : subtrees) { final Path start = localMavenRepoRoot.resolve(path).normalize(); if (Files.exists(start)) { Files.walkFileTree(start, visitor); } } } GavSetWalker(Path localMavenRepoRoot, GavSet gavSet, String version); void walk(Consumer<GavtcPath> callback);  }