code: private ClassLoader getCombinedClassLoader(ClassRealmManager manager) {
  
          List<URL> urlList = new ArrayList<URL>();
  
          // add thread classpath
          ClassLoader threadCL = SecurityActions.getThreadContextClassLoader();
          if (threadCL instanceof URLClassLoader) {
              urlList.addAll(Arrays.asList(((URLClassLoader) threadCL).getURLs()));
          }
  
          // add maven core libraries
          ClassRealm core = manager.getCoreRealm();
          if (core != null) {
              urlList.addAll(Arrays.asList(core.getURLs()));
          }
  
          ClassRealm mavenApi = manager.getMavenApiRealm();
          if (mavenApi != null) {
              urlList.addAll(Arrays.asList(mavenApi.getURLs()));
          }
  
          // we need to keep threadCL as parent, otherwise we'll get ClassCastException in runtime
          URLClassLoader cl = new URLClassLoader(urlList.toArray(new URL[0]), threadCL);
  
          // for (URL u : cl.getURLs()) {
          // System.out.println("CLR: " + u);
          // }
  
          return cl;
      }
docs: creates a class loader that has access to both current thread classloader and Maven Core classloader