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


Build a simple plugin

This page describes how you can build a very simple DeepaMehta plugin. This demo plugin just creates a new topic type.

Once installed in DeepaMehta the topic type will appear in the create menu, so you can create instances. And you will be able to fulltext search for the instances.

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 your type definitions become deployable by other DeepaMehta users.


All you need is Java 1.6 and Maven (version 3 is recommended) installed.

You don't need a DeepaMehta installation. The DeepaMehta build system will provision a DeepaMehta installation just for your plugin.

Setup the directory structure

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 Demo Plugin 1</name>



Create the file migration1.json:

    topic_types: [
            value: "My Topic Type",
            uri: "domain.dm4_demo_plugins.my_topic_type",
            data_type_uri: "dm4.core.text",
            index_mode_uris: ["dm4.core.fulltext"],
            view_config_topics: [
                    type_uri: "dm4.webclient.view_config",
                    composite: {
                        dm4.webclient.add_to_create_menu: true

Create the file

requiredPluginMigrationNr = 1
importModels = de.deepamehta.webclient