String serviceUnitAnalyzerClazzName = getServiceUnitAnalyzer();
// The ServiceUnitAnalyzer should give us the consumes and
// provides
if (serviceUnitAnalyzerClazzName != null) {
ServiceUnitAnalyzer serviceUnitAnalyzer = (ServiceUnitAnalyzer) newClassLoader
.loadClass(serviceUnitAnalyzerClazzName).newInstance();
getLog().info(
"Created Service Unit Analyzer " + serviceUnitAnalyzer);
serviceUnitAnalyzer.init(serviceUnitArtifactsDir);
// Need to determine whether we are using the dummy analyzer
// if so we need to give it the services file
if (serviceUnitAnalyzer instanceof JbiServiceFileAnalyzer) {
((JbiServiceFileAnalyzer) serviceUnitAnalyzer)
.setJbiServicesFile(jbiServicesFile);
}
consumes.addAll(serviceUnitAnalyzer.getConsumes());
provides.addAll(serviceUnitAnalyzer.getProvides());
}
getLog().info(
"generated : consumes " + consumes + " provides "
+ provides);