Plugins

Last Updated: May 16, 2023
documentation for the dotCMS Content Management System

Benefits of OSGi Plugins

OSGi Plugins can be deployed and hot-swapped at runtime without needing an application server restart/reload. OSGi plugins:

  • Are easy to develop and deploy on a running dotCMS system.
  • Provide methods to easily implement new functionality in dotCMS via understandable extension points.
  • Provide a separate class loading environment in which you can deploy different versions of common libraries used by dotCMS (other than those provided by dotCMS out of the box).
  • Can interact with dotCMS's classloader to override any class inside dotCMS.
  • Can be Push Published between environments.
  • Are stored as plain OSGi bundles.

⚠️ Important Notes Regarding Plugins

Plugins, even those that are developed by dotCMS, live outside of the dotCMS core system and are not supported by dotCMS without an additional OSGi support engagement. dotCMS Plugins are made available as examples; are not guarenteed to work; and are updated “lazily”, or as needed, by dotCMS staff.

Plugins in dotCMS are powerful and can modify the dotCMS platform and even underlying OS when needed. There is no sandbox around an OSGi plugin to protect against problems with the plugin.

  • By definition, plugins override dotCMS code.
    • This means they can not be sandboxed for safety.
    • This makes them more like operating system drivers — which give you the flexibility to change anything, but also the potential to break existing functionality in ways that dotCMS can not protect against.
  • All plugins run the risk of breaking existing dotCMS functionality.
    • Although many plugin changes can be done relatively safely, there is always a chance that, when you activate your plugin, your dotCMS installation will not work properly.
    • If this happens, you will need to uninstall your plugin and fix the problem.
    • Plugins can be uninstalled by modifying files in the dotCMS installation folder; for more information, please see the documentation referenced below.

Java Versioning

While containerized releases have removed the need to think about the underlying Java version for basic dotCMS operation, it is important to build plugins using the same version of Java that dotCMS uses. On current agile and LTS releases, dotCMS runs, ships and tests with OpenJDK 11.

dotCMS plans to transition to Java 14 in later versions. However, as of the time of writing, there is not a firm schedule for this move.

To find the version of Java used by your current installation of dotCMS, browse to System → Maintenance and check under the System Info tab.

What JDK Vendors Does dotCMS Support?

The following companies and organizations provide long term support for Java versions based on the OpenJDK.

Where to Find Example Plugins

dotCMS makes two plugin repos available to provide starting points for your own plugin development. Again, caveat emptor, as these plugins, even those that are developed by dotCMS, live outside of the dotCMS core system and are not supported by dotCMS without an additional OSGi support engagement. These Plugins are made available as examples; are not guarenteed to work; and are updated “lazily”, or as needed, by dotCMS staff.

  • Plugin Seeds - this repo is filled with examples intended to show the different areas of dotCMS that you can plugin to and extend as needed.
  • dotCMS-Plugins - this repo is for plugins developed to address real world use cases and address specific implementation requirements.
  • The Plugin Examples documentation section provides some additional information.

On this page

×

We Dig Feedback

Selected excerpt:

×