Open Alexander-Shukaev opened 5 years ago
Since I am a new user, perhaps, I can ask a question indirectly related to this issue. How do I build a Maven project using lsp-java
? I see two relevant functions, lsp-java-update-project-configuration
and lsp-java-build-project
. Both of which succeeded (if invoked properly). However, I don't see any jar
files appearing. Where are the build artifacts? Sorry for these dumb questions.
lsp-java-update-project-configuration
This will refresh the pom.xml data but is pretty much no longer needed since latest version of lsp-java tracks automatically the pom.xml changes.
lsp-java-build-project
This will produce only ".class"(equivalent to the Build project in eclipse if you are familiar with it).
If you want to do build the project(e. g. invoke mvn clean install
) I would recommend you to use projectile
's projectile-compile-project
. You may try also https://github.com/apg/mvn-el .
Describe the bug
If one invokes
lsp-java-update-project-configuration
, for example, frommagit-status
buffer,(buffer-file-name)
isnil
, hence the backtrace (see below). That is, it won't even reach a hint error(error "Update configuration could be called only from build file(pom.xml or gradle build file)"
(by the way it's ratheruser-error
).Expected behavior
User-friendly approach would be to allow invocation of
lsp-java-update-project-configuration
from any (sub)directory or file of the project. All you need is a reusable function to locate dominating files that you are looking for to satisfy condition, e.g.:And now:
Logs