fitnesse-maven-classpath icon indicating copy to clipboard operation
fitnesse-maven-classpath copied to clipboard

Support for localRepository configuration is not implemented (and no warning is given and bad stuff happens)

Open mudnaes opened this issue 14 years ago • 1 comments

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 :-)

mudnaes avatar May 07 '10 08:05 mudnaes

I ran into the same bug today. Will see if we can create a patch tomorrow.

asikkema avatar Nov 29 '10 14:11 asikkema