Giter VIP home page Giter VIP logo

jdt.ls-extension-archetype's Introduction

JDT.LS Extension Maven archetype

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

Pre-Requisites :

  • 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

Accessing the archetype from Eclipse

In Eclipse, first add the Open Archetypes catalog :

  1. On the Archetypes Preferences page (Windows: Window > Preferences; OS X: Eclipse> Preferences or โŒ˜,), open Maven > Archetypes, click on the Add Remote Catalog... button

  2. Click OK to close the dialog

  3. Click OK to close the preferences

Accessing the archetype from command line

Open your terminal or Windows CMD:

  1. 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
  2. Enter the groupId
  3. Enter the artifactId
  4. Enter the name of the package under which your code will be created
  5. Enter the version of your project
  6. Confirm

Creating a new project in Eclipse, using the Maven wizard

  1. 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 to 1.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 to oxygen .
  • Hit Finish
  • Wait for awesomeness

Once the projects are created, you'll just have to start coding ...

Building the project with Maven

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.

Signed artifacts

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

jdt.ls-extension-archetype's People

Contributors

fbricon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.