}
faces = new FacesImpl(null, new FileNameMapperImpl(fileNameMappings), dynamicResourceHandler);
faces.start();
ResourceWriterImpl resourceWriter = new ResourceWriterImpl(new File(resourcesOutputDir),
getDefaultResourceProcessors(), getLogger(), resourcesWithKnownOrder);
ResourceTaskFactoryImpl taskFactory = new ResourceTaskFactoryImpl(faces, pack);
taskFactory.setResourceWriter(resourceWriter);
executorService = createExecutorService();
CompletionService<Object> completionService = new CountingExecutorCompletionService<Object>(executorService);
taskFactory.setCompletionService(completionService);
taskFactory.setSkins(skins);
taskFactory.setLog(getLogger());
taskFactory.setFilter(createResourcesFilter());
taskFactory.submit(foundResources);
getLog().debug(completionService.toString());
Future<Object> future = null;
while (true) {
future = completionService.take();
if (future != null) {
try {
future.get();
} catch (ExecutionException e) {
getLog().error(e);
}
} else {
break;
}
}
getLog().debug(completionService.toString());
resourceWriter.writeProcessedResourceMappings(new File(staticResourceMappingFile), staticResourcePrefix);
resourceWriter.close();
} catch (Exception e) {
throw new MojoExecutionException(e.getMessage(), e);
} finally {
if (cpResources != null) {