Spring dmServer support for IntelliJ IDEA

IDEA continues to expand support for J2EE application servers and has recently adopted the integration with OSGI-based Spring dmServer.

The features of the new integration include:

  • local and remote run configurations for both 1.0 and 2.0 server families
  • automatic management of the libraries and bundles installed at server runtime
  • dmServer platform archives (PAR) support
  • OSGI-aware intentions for Java and manifest editors
  • dmShell access

If you like to try it out, first download dmServer from SpringSource download center (or use direct links for most recent 2.0.1 or older 1.0 releases — both supported in IDEA).

Once server is here, you can register an installation in IDEA (Settings/Application Servers), which will recognize the version and load configuration properties from appropriate location.

While registering a server, IDEA creates a corresponding OSGI framework instance which will drive the compilation of the code.

Every dmServer comes with pre-installed bundles that are automatically available for every deployed module. Starting from 2.0 it also supports the libraries — the packs of bundles which may be imported as a single unit. IDEA allows to see the installed set of artifacts:

and allows to search for additional ones in the Spring Bundles Repository:

Once the set of libraries is defined, it’s time to start coding!

An integration will help you to maintain the valid set of imported bundles and packages in the plugin manifest,

assist with the gathered knowledge about the set of available packages:

and will validate the actual set of imported packages:

You may use dmServer specific Platform Archives to define a pack of the artifacts to be deployed as a single unit, and define the boundaries for the services and import rules:

Support for dmServer 2.0-specific “plans” that serve the same purpose will be added in near future.

OSGI-aware compilation results (provided by well known “Osmorc” OSGI integration for IDEA) are automatically transformed into the artifacts:

which may be deployedfrom the run configuration:

Both local and remote servers are supported, in the latter case user may configure a ways to deliver the artifacts to remote server via “before run” task.

While the server is running, you may connect to the dmShell and use console commands to control the server state:

If you’re interested please download the plugin and feel free to give your feedback at the forums or our bugtracker.

Comments below can no longer be edited.

12 Responses to Spring dmServer support for IntelliJ IDEA

  1. Avatar

    Stefan says:

    May 6, 2010

    Nice to see IDEA support dm Server.
    So far deploying single bundles works fine but as we have already migrated to dm Server 2 with plans I hope that you’ll add support for plans soon.

  2. Avatar

    Phil Bickler says:

    May 6, 2010

    Thanks for this. I was waiting for dm Server support in IntelliJ.

    But before I use this I wonder where the source code of the plugin is as you are clearing reusing and modifying EPL-licensed code from the SpringSource dm Server Tools in this plugin. I don’t want to violate any license by using this…

    Thanks for your clarification.


  3. Avatar

    mgolubev.jetbrains says:

    May 11, 2010


    I am working on the plan’s support for 2.0 dmServer right now, please expect this feature to be added in a week or so.

    For the meantime, I would really appreciate some comments from you on the following topic which is not yet clear for me.

    AFAIU, the plan’s deployment depends on the ability to push the set of artifacts (which constitutes the plan) into the bundle repository. Until now, for deployment we are using the JMX command pointing server to the local url of the prepared artifact, so deployment process right now is not affecting any files/folders under the server root folder.

    For supporting a plans we can either modify server configs by registering additional external bundles repository pointing to some location under IDEA project, or start to actually copy the plan’s bundles into the server (AFAIK, STS works this way).

    Each ways has some pros and cons so I would appreciate any thoughts from real dm practitioner on how to make it better.


  4. Avatar

    mgolubev.jetbrains says:

    May 11, 2010


    To my best knowledge, the only EPL code actually included into the IDEA plugin is the “com.springsource.server.management.remote-1.0.0.RELEASE.jar”. At the runtime, this jar is being internally deployed to dm server and participates in communication between IDEA plugin and server.

    This JAR is available at the https://anonsvn.springsource.org/svn/dm-server-tools/tags/2.3.0.RELEASE/com.springsource.server.ide.runtime.core/ and according to about.html in the same folder, had been made public under EPL by SpringSource (also I have no idea of where the sources for the code in this jar comes from). In IDEA this jar is used without any modifications and for the same purposes as original.

    Obviously the whole idea of dm server tooling as well as some of the concrete implementation had been influenced by the code from EPL dm-server-tools. However, I believe that all of the code in the actual state of IDEA plugin had been either written from scratch, or had been rewritten deeply enough to be not considered as a derivative.

    Thus, right now I am not going to publish plugin sources. I will definitely include the note about the usage of the EPL covered “com.springsource.server.management.remote-1.0.0.RELEASE.jar” into the next plugin version, thanks for a good catch.


  5. Avatar

    Eric Brusseau says:

    May 19, 2010

    With IntelliJ 9.0.2, and version 0.6.7, I am having a problem launching any project with the dm Server facet. The error is:

    Exception in thread “main” com.springsource.osgi.launcher.parser.ParseException: Config path ‘/Users/Eric/springsource/springsource-dm-server-2.0.1.RELEASE/”/Users/Eric/springsource/springsource-dm-server-2.0.1.RELEASE/lib/com.springsource.kernel.launch.properties”‘ does not exist.

    Obviously, something is munging the framework home with the -config property. I’m using this on a Mac, BTW, so I don’t know if this is an issue on Windows.

  6. Avatar

    Arik says:

    June 23, 2010

    Hi Eric, all,

    I’m getting this too. Is there a fix or workaround for this?

  7. Avatar

    Arik says:

    June 23, 2010

    I think this only happens on Mac/Linux – see http://youtrack.jetbrains.net/issue/IDEA-55187?projectKey=IDEA

  8. Avatar

    Jasper says:

    June 25, 2011

    Followed the instructions using Virgo 2.1.1 as dmServer in IDEA 10.5, but getting the following error when I create a new project:

    Error during dispatching of java.awt.event.MouseEvent[MOUSE_CLICKED,(119,219),absolute(1096,264),button=1,modifiers=Button1,clickCount=1] on frame0: Could not initialize class com.intellij.dmserver.facet.DMBundleFacet
    java.lang.NoClassDefFoundError: Could not initialize class com.intellij.dmserver.facet.DMBundleFacet
    at com.intellij.dmserver.facet.DMBundleFacetType.(DMBundleFacetType.java:27)

    Guess something was lost in the transfer of dmServer from SpringSource to Eclipse?

  9. Avatar

    Michael Golubev says:

    July 8, 2011


    In order to use dmServer (Virgo) integration with IDEA 10.5(.1) you should download the latest version of the plugin — 0.9.6, which is available since today.


  10. Avatar

    Sonar says:

    August 9, 2011

    Hmmm.. Tried the plugin and it is really buggy. I can’t manage to save a dm Server Plan, which, I believe, defines the artifact deployment order. Are there any other ways to configure the order in which my artifacts get deployed?


  11. Avatar

    Sonar says:

    August 10, 2011


    There are a couple of fixed that haven’t got their ways to 10.5 release.
    All of them will be included into IDEA XI EAPs which will be published soon.


  12. Avatar

    Avatar Ng says:

    January 30, 2019

    Please add back support for DMServer in 2019, OSGi community and modularity is not dead and very much demanding.

Discover more