Changes between Version 6 and Version 7 of PluginDevelopmentGuide


Ignore:
Timestamp:
08.04.2013 02:07:09 (7 years ago)
Author:
jri
Comment:

Redeploy the plugin

Legend:

Unmodified
Added
Removed
Modified
  • PluginDevelopmentGuide

    v6 v7  
    3939== The plugin turn-around cycle == 
    4040 
    41 This section illustrates how to begin a plugin project, how to build and how to deploy a plugin, and how to re-deploy the plugin once you made changes in its source code. In other words, this section illustrates the plugin development turn-around cycle. 
     41This section illustrates how to begin a plugin project, how to build and how to deploy a plugin, and how to redeploy the plugin once you made changes in its source code. In other words, this section illustrates the plugin development turn-around cycle. 
    4242 
    4343Let's start with a very simple plugin called //DeepaMehta 4 Tagging//. This plugin will just create a new topic type called `Tag`. Once the plugin is activated the topic type will appear in the DeepaMehta Webclient's //Create// menu, so you can create tag topics and associate them with arbitrary topics. And you will be able to fulltext search for tags. 
     
    207207 
    208208In another terminal: 
     209 
    209210{{{ 
    210211#!sh 
     
    301302The result so far: the //DeepaMehta 4 Tagging// plugin provides a new topic type definition or, in other words: a data model. All the active operations on the other hand like create, edit, search, delete, associate, and navigate are provided by the DeepaMehta Webclient at a generic level, and are applicable to your new topic type as well. 
    302303 
     304=== Redeploy the plugin === 
     305 
     306Once you've made any changes to the plugin files, you have to build the plugin again. Just like before in the plugin terminal: 
     307 
     308{{{ 
     309#!sh 
     310mvn clean package 
     311}}} 
     312 
     313Once building is complete the changed plugin is redeployed automatically. You'll notice activity in the DeepaMehta terminal: 
     314 
     315{{{ 
     316#!txt 
     317Apr 8, 2013 1:10:40 AM de.deepamehta.core.osgi.PluginActivator stop 
     318INFO: ========== Stopping plugin "DeepaMehta 4 Tagging" ========== 
     319Apr 8, 2013 1:10:40 AM de.deepamehta.core.impl.PluginImpl removeService 
     320INFO: Removing DeepaMehta 4 core service from plugin "DeepaMehta 4 Tagging" 
     321Apr 8, 2013 1:10:40 AM de.deepamehta.core.impl.PluginImpl removeService 
     322INFO: Removing Web Publishing service from plugin "DeepaMehta 4 Tagging" 
     323Apr 8, 2013 1:10:40 AM de.deepamehta.core.impl.PluginImpl removeService 
     324INFO: Removing Event Admin service from plugin "DeepaMehta 4 Tagging" 
     325... 
     326... 
     327Apr 8, 2013 1:10:44 AM de.deepamehta.core.osgi.PluginActivator start 
     328INFO: ========== Starting plugin "DeepaMehta 4 Tagging" ========== 
     329... 
     330... 
     331Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.PluginManager activatePlugin 
     332INFO: ----- Activating plugin "DeepaMehta 4 Tagging" ----- 
     333Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.PluginImpl createPluginTopicIfNotExists 
     334INFO: Installing plugin "DeepaMehta 4 Tagging" in the database ABORTED -- already installed 
     335Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.MigrationManager runPluginMigrations 
     336INFO: Running migrations for plugin "DeepaMehta 4 Tagging" ABORTED -- everything up-to-date (migrationNr=1) 
     337... 
     338... 
     339Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.PluginManager activatePlugin 
     340INFO: ----- Activation of plugin "DeepaMehta 4 Tagging" complete ----- 
     341Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.PluginManager checkAllPluginsActivated 
     342INFO: ### Bundles total: 33, DeepaMehta plugins: 17, Activated: 17 
     343Apr 8, 2013 1:10:44 AM de.deepamehta.core.impl.PluginManager activatePlugin 
     344INFO: ########## All Plugins Activated ########## 
     345Apr 8, 2013 1:10:44 AM de.deepamehta.plugins.webclient.WebclientPlugin allPluginsActive 
     346INFO: ### Launching webclient (url="http://localhost:8080/de.deepamehta.webclient/") ABORTED -- already launched 
     347... 
     348}}} 
     349 
     350In contrast to the initial build of the plugin you can recognize some differences in this log: 
     351 
     352* The old version of the plugin currently deployed is stopped. 
     353* The new version of the plugin is deployed (that is //started// and //activated//) right away. 
     354* The plugin is //not// installed again in the database as already done while initial build. 
     355* The migration is //not// run again as already done while initial build.