Skip to content

Latest commit

 

History

History

plugin-maven

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Equo IDE for Maven

Maven Plugin Changelog Javadoc

  • a build plugin for Gradle and Maven
  • downloads, configures, and launches an instance of the Eclipse IDE
  • ensures that all of your devs have a zero-effort and perfectly repeatable IDE setup process
  • makes it easy to develop, dogfood, and distribute new IDE plugins

Use it like this with mvn equo-ide:launch

<plugin><!-- add this to pom.xml/<project><build><plugins> -->
  <groupId>dev.equo.ide</groupId>
  <artifactId>equo-ide-maven-plugin</artifactId>
  <version>{{ latest version at top of page }}</version>
  <configuration>
    <!-- see https://github.com/equodev/equo-ide/blob/main/CATALOG.md for all available plugins -->
    <jdt/>
    <m2e><autoImport>${project.basedir}</autoImport></m2e>
    <!-- or you can add specific p2 urls and targets
         https://github.com/equodev/equo-ide/blob/main/P2_MULTITOOL.md for more info -->

    <!-- you can also customize the IDE branding -->
    <branding>
      <title>My IDE</title>
      <icon>${project.basedir}/my_icon.png</icon>
      <splash>${project.basedir}/my_splash.png</splash>
    </branding>
    <!-- and make your own plugins, without learning OSGi or p2 -->
    <welcome>
      <openUrl>https://github.com/me/myproject/CONTRIBUTING.md</openUrl>
    </welcome>
    
    <!-- for catalog entries you can set workspace properties using DSL -->
    <platform>
      <showLineNumbers>true</showLineNumbers>
      <showWhitespace>true</showWhitespace>
    </platform>
    <!-- or you can set arbitrary properties -->
    <workspaceProps>
      <workspaceProp>
        <path>instance/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs</path>
        <key>lineNumberRuler</key>
        <value>true</value>
      </workspaceProp>
      <workspaceProp>
        <path>instance/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs</path>
        <key>showWhitespaceCharacters</key>
        <value>true</value>
      </workspaceProp>
    </workspaceProps>
  </configuration>
</plugin>

Task listing

  • equo-ide:launch to launch
    • -Dclean wipes all workspace settings and state before rebuilding and launching.
      • (also revalidates cached p2 data)
    • -DshowConsole pipes console output of launched IDE to the build console.
    • -DinitOnly initializes the runtime to check for errors then exits.
    • -DdebugClasspath=[names|paths] dumps the classpath (in order) without starting the application.
    • -DdebugIde blocks IDE startup and prints instructions to help you attach a remote debugger.
    • -DuseAtomos=[true|false] determines whether to use Atomos
  • equo-ide:list to debug IDE dependencies (p2 multitool)

Web browser

By default, SWT uses the system browser (Internet Explorer on Windows, Safari on mac, etc). This means that SWT browser features are different depending on which operating system is being used. To get a consistent modern browser experience, you can replace the SWT system browser with the Equo Chromium browser.

<configuration>
  <equoChromium/>

Using Equo Chromium will add https://dl.equo.dev/chromium-swt-ee/equo-gpl/mvn to your list of maven repositories, which is used only for the Chromium dependency.

User plugins

See the code for our ChatGPT plugin for an example of how you can build, dogfood, and distribute an Eclipse plugin without OSGi or p2.

You can use plugin.xml and .e4xmi and all of that, but if you prefer to just make method calls without any metadata, you can also use our IdeHook mechanism. It's what we use to provide features like the welcome hook and automatically importing the current project into Gradle, for example.

Right now some of the user plugin functionality is only available in the Gradle plugin, PR's to help resolve these issues would be appreciated!

  • #54 port the p2deps plugin for compiling against p2 artifacts from Gradle to Maven.
  • #101 port the dogfood feature for inserting the compiled jar into the launched IDE from Gradle to Maven.

How it works

Much of the complexity of downloading, running, and modifying the Eclipse IDE is caused OSGi and p2. Equo IDE replaces p2 and OSGi with a simple shim called Solstice. This makes it easier and faster to build, debug, and run Eclipse-based applications.

Limitations

  • Java 11+
  • Maven 3.0+
  • Eclipse JDT 2022-09 (4.25) or later, though it might work on earlier versions too.