When using lsp-java with a 3 file project and one external jar, I am not using gradle or maven. I put the jar into a lib directory, open a Java file and everything works. Then I follow find-definitions and "only" see de-compiled code, not the source. Of course, I need to add a source jar. But how?
I experimented with putting a source jar into the lib directory and, like magic, the file ~/.emacs.d/workspace/project_hex/.classpath shows the source jar attached to the library jar and it works.
Now the questions which I couldn't so far answer, even without some digging through the lsp code:
Which piece of software actually generates the directories in
~/.emacs.d/workspace/, is it the java language server or is it lsp-java in some way not easily found in the sources?While magic is nice, I wonder if there are configuration options which let me configure the
.classpathmanually? I foundlsp-java-import-generates-metadata-files-at-project-rootandlsp-java-configuration-update-build-configurationwhich seem to be related, but could not figure out what they are doing.
Why am I not using gradle? Curiosity to figure out how things work.