@Test public void walkGroup() throws IOException { final GavSet gavSet = GavSet.builder() .include("org.group1.compon1") .build(); Collector c = new Collector() .expect("org.group1.compon1:compon-artifact1:2.3.4:jar", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4.jar") .expect("org.group1.compon1:compon-artifact1:2.3.4:pom", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4.pom") .expect("org.group1.compon1:compon-artifact1:2.3.4:jar:javadoc", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4-javadoc.jar") .expect("org.group1.compon1:compon-artifact1:2.3.4:jar:sources", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4-sources.jar") .expect("org.group1.compon1:compon-artifact1:2.3.4:tar.gz:sources", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4-sources.tar.gz") .expect("org.group1.compon1:compon-artifact1:2.3.4:tar.gz", "org/group1/compon1/compon-artifact1/2.3.4/compon-artifact1-2.3.4.tar.gz") ; new GavSetWalker(LOCAL_MAVEN_REPO_ROOT_DIR, gavSet, "2.3.4").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);  }