Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log which class triggered errors in mojos #112

Closed
chrylis opened this issue Nov 8, 2018 · 3 comments
Closed

Log which class triggered errors in mojos #112

chrylis opened this issue Nov 8, 2018 · 3 comments
Assignees
Milestone

Comments

@chrylis
Copy link

chrylis commented Nov 8, 2018

I'm trying to upgrade from 1.6.1 to 1.6.2, and I'm running into "Unable to get a Groovy class from classpath." in the groovydoc goal. I suspect this is something to do with the modularization in 2.5 and it just wants a particular module I don't already have, but the error message would be much more helpful if it included which class produced the ClassNotFoundException.

I am making some progress with -X on my development machine, but this first cropped up in CI, where all I have is the standard log.

cf

throw new MojoExecutionException("Unable to get a Groovy class from classpath. Do you have Groovy as a compile dependency in your project?", e);

@keeganwitt
Copy link
Member

Sorry for the late reply. I'd need to see some of your pom to figure out what's going on here. The stacktrace should already log the class it can't find. I'm not sure an easy way to parse the stacktrace to include the class in the regular exception message.

@chrylis
Copy link
Author

chrylis commented Dec 28, 2018

In this particular case, the log message is in the catch block for ClassNotFoundException e; the missing class is (in practice although not required by API contract) listed in e.message.

@keeganwitt keeganwitt added this to the 1.6.3 milestone Dec 30, 2018
@keeganwitt keeganwitt self-assigned this Dec 30, 2018
@keeganwitt
Copy link
Member

OK. I've added a change to log the message from the original exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants