Mercurial > hg > release > thermostat-2.0
changeset 2284:24356daad9c5
Make dependency-analyzer consistent with core.
Reviewed-by: neugens
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2016-May/018697.html
author | Severin Gehwolf <sgehwolf@redhat.com> |
---|---|
date | Mon, 02 May 2016 18:43:01 +0200 |
parents | bc41e22fcd76 |
children | 9886546c9092 |
files | dependency-tool/command/pom.xml dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/DependencyAnalyzerCommand.java dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/internal/PathProcessor.java |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dependency-tool/command/pom.xml Tue May 03 10:42:25 2016 +0200 +++ b/dependency-tool/command/pom.xml Mon May 02 18:43:01 2016 +0200 @@ -61,6 +61,11 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-launcher</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope>
--- a/dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/DependencyAnalyzerCommand.java Tue May 03 10:42:25 2016 +0200 +++ b/dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/DependencyAnalyzerCommand.java Mon May 02 18:43:01 2016 +0200 @@ -95,7 +95,10 @@ JarLocations locations = new JarLocations(); locations.getLocations().add(systemPluginRoot.toPath()); locations.getLocations().add(userPluginRoot.toPath()); - locations.getLocations().add(systemLibRoot.toPath()); + // System lib root shall not be scanned recursively. See BundleManagerImpl. + for (File f: systemLibRoot.listFiles()) { + locations.getLocations().add(f.toPath()); + } handler = new PathProcessorHandler(locations); }
--- a/dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/internal/PathProcessor.java Tue May 03 10:42:25 2016 +0200 +++ b/dependency-tool/command/src/main/java/com/redhat/thermostat/tools/dependency/internal/PathProcessor.java Mon May 02 18:43:01 2016 +0200 @@ -44,6 +44,8 @@ import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; +import com.redhat.thermostat.launcher.PluginDirFileVisitor; + /** */ public abstract class PathProcessor { @@ -53,7 +55,7 @@ public PathProcessor() { matcher = FileSystems.getDefault().getPathMatcher("glob:*.jar"); - visitor = new SimpleFileVisitor<Path>() { + visitor = new PluginDirFileVisitor() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { Path name = file.getFileName();