* Sorts foundResources using the determined ordering.
*/
private void reorderFoundResources(Collection<VFSRoot> cpResources, DynamicResourceHandler dynamicResourceHandler,
ResourceFactory resourceFactory) throws Exception {
Faces faces = new FacesImpl(null, new FileNameMapperImpl(fileNameMappings), dynamicResourceHandler);
faces.start();
initializeServiceTracker();
// if there are some resource libraries (.reslib), we need to expand them
foundResources = new ResourceLibraryExpander().expandResourceLibraries(foundResources);