-
I'm trying to configure jdtls LSP for Neovim and by analogy with lombok I'm passing the mapstruct jar file to java with --javaagent= but I'm getting an error: "Failed to find Premain-Class manifest attribute in /home/user/.local/lib/mapstruct.jar\n" I searched around and found out a special class is needed which is not present in the source code, which leads me to believe I'm not using mapstruct the right way. Since I've used it through IntelliJ I know it should be able to do the job, but apparently this is not the way to use it. Can I use mapstruct in this way at all or the Eclipse and IntelliJ plugins are doing something else to enable mapstruct? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Why are you passing mapstruct with I would assume that the jdtls LSP can properly handle Maven / Gradle projects and it can read the annotation processors properly. |
Beta Was this translation helpful? Give feedback.
-
Ah, I had forgotten I had posted this here. Yes, I found out jdtls was handling it correctly for Maven projects, I believe the same holds true for Gradle projects. I had some other issue which was related to the order of declaration of the annotation processors in the pom file. |
Beta Was this translation helpful? Give feedback.
Why are you passing mapstruct with
--javaagent
? MapStruct is not an agent, it's a regular Java annotation processor.I would assume that the jdtls LSP can properly handle Maven / Gradle projects and it can read the annotation processors properly.