private static URL extractUrlFromResource(final Resource resource) throws IOException {
        val nestedUrl = StringUtils.replace(resource.getURL().toExternalForm(), "nested:", "file:");
        return extractArchiveURL(toURL(nestedUrl));
    }
If the provided resource is a classpath resource, running inside an embedded container,
and if the container is running in a non-exploded form, classpath resources become non-accessible.
So, this method will attempt to move resources out of classpath and onto a physical location
outside the context, typically in the "cas" directory of the temp system folder.

@param resource     the resource
@param isDirectory  the if the resource is a directory, in which case entries will be copied over.
@param containsName the resource name pattern
@return the file
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java