if (pack != null) {
reorderFoundResources(cpResources, dynamicResourceHandler, resourceFactory);
}
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);