diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java index 7f18f389f4..74058df515 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java @@ -62,6 +62,9 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin { @Parameter private String testURI = null; + @Parameter + private String testClientID = null; + @Parameter private String testUser = null; @@ -107,8 +110,8 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin { long timeout = System.currentTimeMillis() + spawnTimeout; while (System.currentTimeMillis() <= timeout) { try (ServerLocator locator = ActiveMQClient.createServerLocator(testURI)) { - if (testUser != null && testPassword != null) { - locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0).close(); + if (testUser != null || testPassword != null || testClientID != null) { + locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0, testClientID).close(); } else { locator.createSessionFactory().createSession().close(); }