This Maven archetype will help you bootstrap the development of a JDT.LS extension, by creating a project with a nested structure :
__artifactId__ : parent pom project
|
|---__artifactId__.core : Core extension
|
|---__artifactId__.test : Test extension (Fragment project)
|
|---__artifactId__.site : p2 update site
The generated plugin extends the JDT.LS by contributing a custom command, implementing org.eclipse.jdt.ls.core.internal.IDelegateCommandHandler
- Java 1.8
- maven 3.0 or later
- Eclipse Oxygen with PDE or later
- m2e 1.8 or later
- m2eclipse-tycho 0.8 or later
In Eclipse, first add the Open Archetypes catalog :
-
On the Archetypes Preferences page (Windows:
Window
>Preferences
; OS X:Eclipse
>Preferences
or⌘,
), openMaven
>Archetypes
, click on theAdd Remote Catalog...
button- Catalog file : http://open-archetypes.github.com/maven-repo/releases/
- Description :
Open Archetypes
-
Click
OK
to close the dialog -
Click
OK
to close the preferences
Open your terminal or Windows CMD:
- Execute
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=http://open-archetypes.github.com/maven-repo/releases/ -DarchetypeGroupId=org.openarchetypes -DarchetypeArtifactId=jdt.ls-extension-archetype
- Enter the groupId
- Enter the artifactId
- Enter the name of the package under which your code will be created
- Enter the version of your project
- Confirm
- Create a new Maven project
- Click
Next
to land on the Archetype page - Select the
Open Archetypes
catalog - Select
jdt.ls-extension
and click Next - Enter the Group Id, Artifact Id and Version informations. Eclipse requires the version to follow a Major.Minor.Micro pattern, so you should use 1.0.0-SNAPSHOT instead of 1.0-SNAPSHOT
- You can change the required properties if needed :
- java_version : The Java version to be used for compiling the plugins. Supported values are
1.8
,9
. Defaults to1.8
- tycho_version : the tycho version that will be used to build the project in command line. Defaults to
1.0.0
- eclipse_platform : the Eclipse platform, will drive what eclipse update site will be used to resolve the Eclipse dependencies.
Supported values are :
oxygen
,photon
. Defaults tooxygen
.
- java_version : The Java version to be used for compiling the plugins. Supported values are
- Hit
Finish
- Wait for awesomeness
Once the projects are created, you'll just have to start coding ...
You can then build your projects in command line, in a terminal, by issuing :
mvn clean verify
A zipped update site will be created as <project.parent>/<project.site>/target/<project.site>-<project.version>-site.zip
.
If the project was created with the eclipse_org_signing
property set to true
, then a sign
profile to sign the generated jars will be available to use, when building the project on the Eclipse.org infrastructure, using :
mvn package -Psign