use of org.codehaus.plexus.util.DirectoryScanner in project tycho by eclipse.
the class AbstractOsgiCompilerMojo method scanBootclasspath.
private String scanBootclasspath(String javaHome, Xpp3Dom[] includes, Xpp3Dom excludeParent) {
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(javaHome);
scanner.setIncludes(getValues(includes));
if (excludeParent != null) {
Xpp3Dom[] excludes = excludeParent.getChildren("exclude");
if (excludes.length > 0) {
scanner.setExcludes(getValues(excludes));
}
}
scanner.scan();
StringBuilder bootClassPath = new StringBuilder();
String[] includedFiles = scanner.getIncludedFiles();
for (int i = 0; i < includedFiles.length; i++) {
if (i > 0) {
bootClassPath.append(File.pathSeparator);
}
bootClassPath.append(new File(javaHome, includedFiles[i]).getAbsolutePath());
}
return bootClassPath.toString();
}
Aggregations