Search code examples
hivemq

HiveMQ Authentication Plugiin with 3rd party library dependency


I am developing a Authentication plugin for HiveMQ broker. I am able to integrate & bring the plugin up & running. No issue so far.

however, I have few dependency on 3rd party jars (used by the plugin itself).

How I can add them to the classpath so that those 3rd party jars are available for HiveMQ when the plugins are executed.

Thanks


Solution

  • The easiest way to add third party dependencies to a HiveMQ plugin is to add the dependency via Maven. Just edit the pom.xml file and add the dependencies needed. If you don't know the exact group and artifact id of your library, you can browse e.g. http://mvnrepository.com to find the correct Maven entry.

    Then just package your plugin as always as described in the packaging chapter of the HiveMQ plugin development guide: http://www.hivemq.com/docs/plugins/2.2.0/#pack-deploy-chapter