code: @Override
    protected ClassLoader getClassLoader() throws MojoExecutionException, MojoFailureException {    
      try {
        @SuppressWarnings("unchecked") List<String> classpathElements = getProject().getCompileClasspathElements();
        if (getLog().isDebugEnabled()) {
          getLog().debug("compile classpath: " + classpathElements);
        }
        classpathElements.add(getProject().getBuild().getOutputDirectory());
        List<URL> urls = new ArrayList<URL>(classpathElements.size());
        for (String classpathElement : classpathElements) {
          urls.add(new File(classpathElement).toURL());
        }
        if (getLog().isDebugEnabled()) {
          getLog().debug("setting classpath to " + urls);
        }
        return new URLClassLoader(urls.toArray(new URL[urls.size()]), getClass().getClassLoader());
      } catch (Exception e) {
        throw new MojoExecutionException("couldn't create the build classpath loader", e);
      }    
    }
docs: {@inheritDoc}