Changes between Version 2 and Version 3 of PluginDevelopmentGuide
- Timestamp:
- 06.04.2013 18:28:15 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PluginDevelopmentGuide
v2 v3 1 [[PageOutline]] 2 1 3 = Plugin Development Guide = 2 4 … … 19 21 }}} 20 22 21 == A very simple plugin ==23 == A very simple plugin: Tagging == 22 24 23 25 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. … … 26 28 27 29 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. 30 31 === Create the plugin === 28 32 29 33 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. … … 43 47 Create the file **`pom.xml`** with this content: 44 48 {{{ 49 #!xml 45 50 <project> 46 51 <modelVersion>4.0.0</modelVersion> … … 84 89 Create the file **`plugin.properties`**: 85 90 {{{ 86 requiredPluginMigrationNr =187 importModels =de.deepamehta.webclient91 requiredPluginMigrationNr=1 92 importModels=de.deepamehta.webclient 88 93 }}} 94 95 === Setup for Hot-Deployment === 96 97 In order to let DeepaMehta hot-deploy the plugin you must include it in DeepaMehta's hot-deployment list. 98 99 Add the line `/home/myhome/deepamehta-dev/dm4-tagging` to DeepaMehta's **`pom.xml`**. Impotant: append a comma to the previous line: 100 {{{ 101 #!xml 102 <project> 103 ... 104 <felix.fileinstall.dir> 105 <![CDATA[ 106 ${project.basedir}/modules/dm4-core/target, 107 ... 108 ${project.basedir}/modules/dm4-storage-neo4j/target, 109 /home/myhome/deepamehta-dev/dm4-tagging 110 ]]> 111 </felix.fileinstall.dir> 112 </project> 113 }}} 114 115 Now start DeepaMehta: 116 {{{ 117 cd deepamehta 118 mvn pax:run 119 }}} 120 121 This starts DeepaMehta in development mode, that is with hot-deployment activated. The terminal gets occupied by the //Gogo// shell now. Type `lb` to see the list of deployed bundles. Your plugin does not yet appear in that list as it is not yet build. 122 123 === Build the plugin === 124 125 In another terminal: 126 {{{ 127 cd dm4-tagging 128 mvn clean package 129 }}} 130 131 This builds the plugin and hot-deploys it. 132