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

ClassNotFound when using lein-autodoc with bifocals #1

Open
aperiodic opened this issue Jun 3, 2012 · 2 comments
Open

ClassNotFound when using lein-autodoc with bifocals #1

aperiodic opened this issue Jun 3, 2012 · 2 comments

Comments

@aperiodic
Copy link

I'm trying to use autodoc to generate documentation for my bifocals project. First, a minor quibble: I had to put the lein-autodoc dependency in the :plugins key of my project.clj, not :dev-dependencies as the documentation suggests (I think this changed in lein 1.7.1).

The real problem, though, is that my namespaces will throw a ClassNotFoundException when loaded in the course of running lein-autodoc, which appears to prevent any documentation from being generated. The offending class is a java wrapper that the project uses. The part that I don't understand is that the compiled class is in the classes directory in the project's root, and that directory is in lein-autodoc's classpath (confirmed by changing lein-autodoc to have it print out its classpath; the very last entry is the classes directory). Am I goofing something up here?

@aperiodic
Copy link
Author

I fooled around a little bit with running the autodoc command directly, using lein-autodoc's shell call as a starting point. I was able to get past the ClassNotFound exception by changing the --src option to be relative to the project root (the plugin was using an absolute one) and passing the fully qualified class name as the --load-classpath option. I also had to set the java.library.path to load the native components of one of the dependencies (is there a better way to do this?).

After all this, I was able to get autodoc to generate my documentation, but most of the functions in the project are missing from it. You can see the output (along with the command to recreate it, in comments in the project.cl) in the autodoc-woes branch of the project.

@tomfaulhaber
Copy link
Owner

Thanks for the issue report, Dan. I'll take a look and see if I can resolve it for you.

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

No branches or pull requests

2 participants