fitnesse-maven-classpath
fitnesse-maven-classpath copied to clipboard
Support for localRepository configuration is not implemented (and no warning is given and bad stuff happens)
It's ok that support is missing, but should have better errorhandling. You get a nasty null pointer exception from: List<String> classpathElements = executionResult.getProject().getTestClasspathElements();
I did modify the code to get a better error reporting:
private List<String> getClasspathElements(Configuration configuration, MavenExecutionRequest request) throws MavenEmbedderException, DependencyResolutionRequiredException {
MavenEmbedder embedder = new MavenEmbedder(configuration);
MavenExecutionResult executionResult = embedder.readProjectWithDependencies(request);
List<Throwable> exs = executionResult.getExceptions();
for (Throwable t : exs ){
t.printStackTrace();
}
List<String> classpathElements = executionResult.getProject().getTestClasspathElements();
return classpathElements;
}
I didn't have time to make the code give an exception if user has configured a localrepository in settings.xml. Sorry :-)
I ran into the same bug today. Will see if we can create a patch tomorrow.