public static Collection<URL> getResourcesFromClassLoader(String resourcePath) throws IOException {
    try {
      //Resolve resources via ContextClassLoader to better support for runtimes like OSGi
      //Issue #2076: But du not use ContextClassLoader and the Spock ClassLoader and merge the results, because this fails for bundle resources
      ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
      if (contextClassLoader != null) {
        return Collections.list(contextClassLoader.getResources(resourcePath));
      }
    } catch (SecurityException ignored) {
    }
    ClassLoader spockClassLoader = ReflectionUtil.class.getClassLoader();
    return Collections.list(spockClassLoader.getResources(resourcePath));
  }
Returns the resources from the {@code Thread.currentThread().getContextClassLoader()}.

@param resourcePath the path of the resource
@return the list of resources
@throws IOException if the resources can't be loaded
spock-core/src/main/java/org/spockframework/util/ReflectionUtil.java