code: private ClassLoader getClassLoader()
          throws MojoExecutionException
      {
          List<Path> classpathURLs = new ArrayList<>();
          this.addRelevantPluginDependenciesToClasspath( classpathURLs );
          this.addRelevantProjectDependenciesToClasspath( classpathURLs );
          this.addAdditionalClasspathElements( classpathURLs );
          
          try
          {
              return LoaderFinder.find( classpathURLs, mainClass );
          }
          catch ( NullPointerException | IOException e )
          {
              throw new MojoExecutionException( e.getMessage(), e );
          }
  
      }
docs: Set up a classloader for the execution of the main class.
  
  @return the classloader
  @throws MojoExecutionException if a problem happens