/hivemq-maven-plugin

Maven plugin which enables starting and debugging a developed plugin on the HiveMQ MQTT broker

Primary LanguageJavaApache License 2.0Apache-2.0

HiveMQ Maven Plugin - User Guide

HiveMQ Maven Plugin

Build Status

This maven plugin simplifies the development of HiveMQ plugins as it provides a simple way to package the plugin and executes it with HiveMQ.

Usage as Maven Profile

HiveMQ Maven plugin embedded as Maven profile
<profiles>
    <profile>
        <id>RunWithHiveMQ</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.hivemq</groupId>
                    <artifactId>hivemq-maven-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>hivemq</id>
                            <phase>package</phase>
                            <goals>
                                <goal>hivemq</goal>
                            </goals>
                            <configuration>
                                <hiveMQDir>
                                       (1)
                                </hiveMQDir>

                                <systemPropertyVariables>
                                    <foo>bar</foo>
                                </systemPropertyVariables>
                                <!-- e.g. activate jmx -->
                                <additionalPluginFiles>
                                    <additionalPluginFile><hiveMQDir>/plugins/hivemq-jmx-metrics-plugin-3.1.0.jar</additionalPluginFile>
                                </additionalPluginFiles>
                                <!-- /activate jmx -->
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>
  1. Insert HiveMQ home directory

Configuration Options

Name Type Required Default Description

hiveMQDir

String

true

Directory of the HiveMQ Jar-file

pluginJarName

String

false

{artifact-id}-{version}.jar

Name of the plugin jar

pluginDirectory

String

false

target

Name of the directory, where the plugin jar is located

verbose

boolean

false

true

HiveMQ logging to standard output enabled

noPlugins

boolean

false

false

Should plugins be loaded, false for plugins are loaded, true for plugins are not loaded

debugMode

String

false

SERVER

Mode of the debugger: CLIENT, SERVER, NONE

debugServerHostName

String

false

localhost

Used in CLIENT debugMode

debugPort

String

false

5005

Port on which HiveMQ in debug mode and IDE connect

hivemqJar

String

false

hivemq.jar

Name of the HiveMQ Jar-file

systemPropertyVariables

String

false

List of system properties propagated to HiveMQ on startup

additionalPluginFiles

File

false

List of additional hivemq plugin files used by HiveMQ

Debug Modes

Client Mode

HiveMQ is the debugging client, so a debugging server has to be opened already, for example by an IDE.

Server Mode

HiveMQ is the debugging server, an IDE debugger can be connected after HiveMQ is started.