Version 2 (modified by jri, 11 years ago) (diff)

A very simple plugin

Plugin Development Guide

DeepaMehta is made to be extensible by 3rd-party developers. Developers extend DeepaMehta by developing plugins (resp. "modules" resp. "applications" which is all synonymous).

Setup the development environment

The best way to start with DeepaMehta plugin development is to build DeepaMehta from source. This way you get a hot-deploy environment, that is DeepaMehta redeploys your plugin automatically once you compile it. This is very handy while development.


  • Java 6 (newer versions might work as well, older versions do not work)
  • Maven 3 (older versions do not work)
  • Git

Build DeepaMehta from source:

git clone git://
cd deepamehta
mvn install -P all

A very simple plugin

Let's start with a very simple plugin. This plugin will just create a new topic type called Tag. Once the plugin is installed the topic type will appear in the DeepaMehta webclient's Create menu, so you can create instances. And you will be able to fulltext search for tags.

Developing such a simple plugin involves no Java coding at all. All is declarative, mainly in JSON format.

Of course the topic type could be created interactively as well, by using DeepaMehta's type editor. However, being packaged as a plugin you can publish it. When other DeepaMehta users install your plugin they can use your type definitions.

You create the plugin just by creating directories and text files. A DeepaMehta plugin project adheres to a certain directory structure and file name conventions.

Setup a directory structure as follows:


Create the file pom.xml with this content:


    <name>DM4 Tagging</name>


Create the file migration1.json:

    topic_types: [
            value: "Tag",
            uri: "domain.tagging.tag",
            data_type_uri: "dm4.core.text",
            index_mode_uris: ["dm4.core.fulltext"],
            view_config_topics: [
                    type_uri: "dm4.webclient.view_config",
                    composite: {
                        dm4.webclient.show_in_create_menu: true

Create the file

requiredPluginMigrationNr = 1
importModels = de.deepamehta.webclient