code: protected void extendRealmClasspath()
              throws MojoExecutionException {
          List<URL> urls = new ArrayList<>();
  
          for (String fileName : compileClasspathElements) {
              File pathElem = new File(fileName);
              try {
                  URL url = pathElem.toURI().toURL();
                  urls.add(url);
                  getLog().debug("Added classpathElement URL " + url);
              } catch (MalformedURLException e) {
                  throw new MojoExecutionException("Error in adding the classpath " + pathElem, e);
              }
          }
  
          ClassLoader jpaRealm =
                  new URLClassLoader(urls.toArray(new URL[urls.size()]), getClass().getClassLoader());
  
          // set the new ClassLoader as default for this Thread
          // will be reverted in the caller method.
          Thread.currentThread().setContextClassLoader(jpaRealm);
      }
docs: This will prepare the current ClassLoader and add all jars and local
  classpaths (e.g. target/classes) needed by the OpenJPA task.
  
  @throws MojoExecutionException on any error inside the mojo