JavaSE-11, Maven, and Eclipse (Eclipse IDE for Enterprise Java and Web Developers is recommended) are required to build the lsp4jakarta project.
Ensure the Eclipse Plug-in Development Environment (PDE) is installed in your Eclipse workspace.
The following are instructions to set up your Eclipse workspace
-
Clone this repository onto your local machine
git clone https://github.com/eclipse/lsp4jakarta.git
-
Build the project with Maven by running the
./buildAll.sh
script from thelsp4jakarta
directory with Maven and Tycho. This script runsmvn clean install
on the components in the following order:-
Builds Jakarta EE JDT LS Extension and runs automated tests
-
Builds Jakarta EE Language Server, creating the
org.eclipse.lsp4jakarta.ls-x.x.x-SNAPSHOT-jar-with-dependencies.jar
-
Builds Eclipse client plug-in that consumes the Jakarta EE Language Server and runs automated tests, copies the
org.eclipse.lsp4jakarta.ls-x.x.x-SNAPSHOT-jar-with-dependencies.jar
to the./jakarta.eclipse/org.eclipse.lsp4jakarta.lsp4jakarta.lsp4e.core/server/
directory
-
-
Import
jakarta.ls
,org.eclipse.lsp4jakarta.core
,org.eclipse.lsp4jakarta.tests
andlsp4jakarta
projects in Eclipse (File --> Open projects from file system --> Select your LSP4Jakarta clone)You may also need to install Tycho Project Configurations to resolve Maven plug-in execution errors.
-
Ensure that the Java projects are being built with
JavaSE-11
(Right-click project --> "Properties" --> "Java Build Path" --> "Libraries") -
Configure the Java build path for the
org.eclipse.lsp4jakarta.lsp4e.core
project:-
Right-click "org.eclipse.lsp4jakarta.lsp4e.core project" --> "Properties" --> "Java Build Path" --> "Libraries"
-
Select "Add External JARs..." and point to the jar located at
./jakarta.eclipse/org.eclipse.lsp4jakarta.lsp4jakarta.lsp4e.core/server/org.eclipse.lsp4jakarta.ls-x.x.x-SNAPSHOT-jar-with-dependencies.jar
-
-
When setting up the Eclipse workspace:
- Bundle 'org.apache.commons.lang3' cannot be resolved in Eclipse workspace
Solution: #46 -
If during initial setup
mvn verify
returns errors or compilation failures, verify that you are using JavaSE-11. You may have to configure$JAVA_HOME
variable and make sure it is pointing to the correct location.
Run org.eclipse.lsp4jakarta.lsp4e.core
as an Eclipse Application to launch a new instance of Eclipse with LSP4Jakarta (Right-click on the org.eclipse.lsp4jakarta.lsp4e.core
project, "Run As" --> "Eclipse Application"). A new Eclipse application will launch with the LSP4Jakarta Eclipse client plug-in installed.
To Debug:
Debug org.eclipse.lsp4jakarta.lsp4e.core
as an Eclipse Application to launch a new instance of Eclipse with LSP4Jakarta (Right-click on the org.eclipse.lsp4jakarta.lsp4e.core
project, "Run As" --> "Eclipse Application"). A new Eclipse application will launch with the LSP4Jakarta Eclipse client plug-in installed.