Changes between Version 2 and Version 3 of BuildASimplePlugin


Ignore:
Timestamp:
24.07.2011 02:17:48 (14 years ago)
Author:
jri
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildASimplePlugin

    v2 v3  
     1[[PageOutline]] 
     2 
    13= Build a simple plugin = 
    24 
    35This page describes how you can build a very simple DeepaMehta plugin. This demo plugin just creates a new topic type. 
    46 
    5 Once installed in DeepaMehta the topic type will appear in the create menu, so you can create instances. 
     7Once the plugin runs the topic type will appear in DeepaMehta's ''create'' menu, so you can create instances. 
    68And you will be able to fulltext search for the instances. 
    79 
     
    911 
    1012Of course the topic type could be created interactively as well, by using DeepaMehta's type editor. 
    11 However, being packaged as a plugin your type definitions become deployable by other DeepaMehta users. 
     13However, being packaged as a plugin you can publish it. 
     14When other DeepaMehta users install your plugin they can use your type definitions. 
    1215 
    1316== Preparation == 
     
    1518All you need is **Java 1.6** and **Maven** (version 3 is recommended) installed. 
    1619 
    17 You don't need a DeepaMehta installation. The DeepaMehta build system will provision a DeepaMehta installation just for your plugin. 
     20You don't need a DeepaMehta installation. The DeepaMehta build system will provision a DeepaMehta installation (including a test database) for your plugin on-the-fly. 
    1821 
    19 == Setup the directory structure == 
     22== Create the plugin == 
    2023 
     24You create the plugin just creating directories and text files. 
    2125A DeepaMehta plugin project adheres to a certain directory structure and file name conventions. 
    2226 
     
    3438}}} 
    3539 
    36 Create the file `pom.xml` with this content: 
     40Create the file **`pom.xml`** with this content: 
    3741 
    3842{{{ 
     
    6165}}} 
    6266 
    63 Create the file `migration1.json`: 
     67Create the file **`migration1.json`**: 
    6468 
    6569{{{ 
     
    8488}}} 
    8589 
    86 Create the file `plugin.properties`: 
     90Create the file **`plugin.properties`**: 
    8791 
    8892{{{ 
     
    9195}}} 
    9296 
     97== Install the plugin == 
     98 
     99{{{ 
     100cd demo-plugin-1 
     101mvn install 
     102}}} 
     103 
     104This builds the plugin and installs it in your local Maven repository. 
     105 
     106== Run the plugin == 
     107 
     108{{{ 
     109mvn pax:run 
     110}}} 
     111 
     112This provisions a DeepaMehta installation with your plugin installed, and runs it. 
     113The usual DeepaMehta web client will show up in a new browser window. 
     114You'll find the new topic type in DeepaMehta's ''create'' menu.