Open delexi opened 11 years ago
Emacs literally just calls Maven to fetch these things, so, assuming it already works fine with Maven Central artifacts, all you need to do is configure Maven to use a repository that has this artifact (with Javadoc). I believe you can install the artifact locally somehow and Maven will fetch it from that local cache.
My pom.xml lists a repository that includes the required artifact and mvn dependency:resolve -Dclassifier=javadoc
actually downloads the JavaDoc for org.javabuilders and puts them into ~/.m2/...
What do you mean by installing the artifact locally?
I actually know very little about Maven, so I could be completely mistaken. Isn't there an install
command, which "Copies the project artifacts into your local repository"?
Anyway, you said you already have a repository configured so you're past that step. Except for the specific destination path, here's the command that javadoc-lookup would run to fetch this dependency. (Change the destination directory as needed to try this.)
mvn org.apache.maven.plugins:maven-dependency-plugin:2.6:get -Dartifact=org.javabuilders:javabuilder-swing:1.1.0:javadoc -Ddest=/tmp/tmp.jar
This process must be exiting with a non-zero exit code, but unfortunately javadoc-lookup is not catching any error messages from Maven right now so we're in the dark.
This command only succeeds, if the current working directory is a maven project with a pom.xml that has the right repository configured. Maybe javadoc-lookup executes mvn from the wrong directory?
Ah, that explains it. I hadn't thought of that. Right now it's running Maven in whatever directory call-process
uses by default, which may just be your home directory. Since this artifact could be being fetched at any time, like during Emacs initialization, it doesn't really have any particular place to run it.
To me, it appears the solution would to be to configure Maven to see this repository globally (i.e. like Maven Central), not from only within a particular project, so that the fetch can be done from any directory. You seem to know more about Maven than me, so does this make sense to you? Fetching only happens once and the result is cached by Emacs, so this configuration doesn't need to be in place forever.
I just stumbled upon this very handy tool and tried to fetch a library that is not in Maven Central, but in a repository hosted on google code. See: http://code.google.com/p/javabuilders/
Upon evaluation the following
I was presented this error:
Is there a way to fetch this javadoc?