+ addRoot(urls, testOutputDirectory);
+ classLoader.add(urls);
+ }
+ catch (Exception e)
+ {
+ getLog().error("Error while creating ClassLoader!", e);
+ throw new MojoExecutionException(e.getMessage());
+ }
+ }
+
+ private void addAllDependenciesToClassPath(MutableClassLoader classLoader)
+ throws
+ MojoExecutionException
+ {
+ try
+ {
+ getLog().debug("Adding all project-dependencies to the ClassLoader...");
+ List<String> classpathFiles = project.getCompileClasspathElements();
+ classpathFiles.addAll(project.getTestClasspathElements());