Plugin Directory Structure - Documentation topics on: directory structure,plugin directory structure,plugins,.

Plugin Directory Structure

Plugins live under the plugins directory on the root of your dotCMS install.  You can have many plugins deployed at the same time.  Remember that plugins can override properties and configurations in dotCMS which can cause issues when many plugins are deployed as you can only set the value for a specific property once. 

To solve this, dotCMS provides the plugin.xml to allow control of your plugin load order.  This file doesn't need to be edited if you do not care about load order. Even if you do configure the file, you only need to put the plugin ids of the plugins you care about in the file.  For example, if you have 20 plugins and you use the file to control the load order of only two plugins, the other eighteen plugins will deploy in reverse alphanumeric order first, and then the two plugins you configured will deploy.  When controlling order the first plugin in the plugins.xml will load last.  This is necessary as that plugin overrides the others regarding config and properties. 

Here is an example plugins.xml The pluginID is the name of the folder of the plugin.


Plugins have the following directory structure. Keep in mind that you do not have to provide all of the folders and files listed below but that these files/folders represent what is possible. You can find examples of the following structure under docs/examples/plugins/ which is an example plugin (inside the dotCMS directory).

  • dotCMSRoot 

    • plugins 

      • org.dotcms.pluginname1 (This will become the Unique ID of the plugin) 

        • build.xml 

        • src 

          • java classes 

        • conf 


          • toolbox-ext.xml

          • web-ext.xml

          • macros-ext.vm

          • struts-config-ext.xml

          • struts-cms.xml

          • tiles-defs-ext.xml

          • dwr-ext.xml

          • portlet-ext.xml

          • liferay-portlet-ext.xml




        • doc 

          • macro_help_doc.html

          • macro_help_li.html 

        • jsp 

        • static_files

        • static_velocity

        • tiny_mce

        • tiny_mce_config.jsp

        • lib

        • classpath

      • org.dotcms.pluginname2 

        • Same as above .... 

      • plugin.xml