for (int i = 1; i < args.length; ++i) {
File moduleFile = new File(args[i]);
if (!moduleFile.isAbsolute()) {
moduleFile = new File(repoPath, args[i]);
}
ModuleDefinition moduleDef = new DefaultModuleDefinition(moduleFile);
moduleDefs.add(moduleDef);
}
} else {
moduleDefs = moduleRepository.findAll();
}
List<URI> badModules = new ArrayList<URI>();
for (ModuleDefinition moduleDef : moduleDefs) {
ModuleDependencyAnalyser analyser =
new ModuleDependencyAnalyser(moduleDef, moduleRepository);
if (System.getProperty("ExcludedPatterns")!=null) {
StringTokenizer st = new StringTokenizer(
System.getProperty("ExcludedPatterns"), ",", false);
Set<String> patterns = new HashSet<String>();
while (st.hasMoreTokens()) {
patterns.add(st.nextToken());
}
analyser.excludePatterns(patterns);
}
if (!analyser.analyse()) {
URI badModule = moduleRepository.getLocation().relativize(moduleDef.getLocations()[0]);
badModules.add(badModule);
System.out.println("<Module name = " + badModule + ">");
System.out.println(analyser.getResultAsString());
System.out.println("</Module>");
}