emacs-lsp / lsp-java

lsp-mode :heart: java
https://emacs-lsp.github.io/lsp-java
GNU General Public License v3.0
650 stars 90 forks source link

Installation to jdtls server is not working,mavan-antrun plugin failed. #418

Open gnumonk opened 1 year ago

gnumonk commented 1 year ago

Describe the bug lsp-install-server to jdtls is build failing.

Note Before logging the bug please make sure that the issue is reproducible with latest melpa packages and it is reproducible with the clean config(the config from the getting started page.

To Reproduce I am using the latest doom emacs and Spacemacs, both have the same issue.

Expected behavior It should install eclipse jdtls.

Screenshots

Logs sh mvnw -Djdt.js.server.root\=/Users/deepakt/.emacs.d/.local/etc/lsp/eclipse.jdt.ls/ -Djunit.runner.root\=/Users/deepakt/.emacs.d/.local/etc/lsp/eclipse.jdt.ls/test-runner/ -Djunit.$ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 48336 100 48336 0 0 53060 0 --:--:-- --:--:-- --:--:-- 53647
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< lsp-java:lsp-java >--------------------------
[INFO] Building lsp-java 1.0.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lsp-java ---
[INFO]
[INFO] --- download-maven-plugin:1.6.8:wget (download-server) @ lsp-java ---
[INFO] Downloading: https://download.eclipse.org/jdtls/milestones/1.5.0/jdt-language-server-1.5.0-202110191539.tar.gz
[INFO] 7/45873K
[INFO] 45871/45873K
[INFO] 45873/45873K
[INFO] downloaded 45873K
[INFO]
[INFO] --- download-maven-plugin:1.6.8:wget (download-spring-boot) @ lsp-java ---
[INFO]
[INFO] --- download-maven-plugin:1.6.8:wget (download-java-dependency) @ lsp-java ---
[INFO]
[INFO] --- download-maven-plugin:1.6.8:wget (download-java-di) @ lsp-java ---
[INFO]
[INFO] --- download-maven-plugin:1.6.8:wget (download-java-test-dependency) @ lsp-java ---
[INFO]
[INFO] --- maven-antrun-plugin:3.1.0:run (prepare) @ lsp-java ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.411 s
[INFO] Finished at: 2023-01-02T13:23:14+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (prepare) on project lsp-java: Execution prepare of goal org.apache.maven.plugins:maven-antrun-$ [ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Pertury commented 1 year ago

I think the issue stems from the fact that maven can't find the tools.jar file.

I had installed openJDK through homebrew and despite me changing my $JAVA_HOME variable in my shell, maven was still looking at /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Plugins/ path for the tools.jar file

I fixed it by uninstalling openJDK from homebrew and installing the Azul distribution instead