3 Replies Latest reply on Oct 7, 2016 1:27 AM by mnovak

    Configuring JMS destinations via wildfly-maven-plugin beforeDeployment/commands

    xdury

      I'm trying to configure JMS destinations for a wildfly server that is being launched via the wildfly-maven-plugin (wildfly:run) like this:

       

      <configuration>
         <artifact>org.wildfly:wildfly-dist:10.1.0.Final</artifact>
         <serverConfig>standalone-full.xml</serverConfig>
         <beforeDeployment>
           <commands>
             <command>jms-queue add --queue-address=demoQueue --entries=java:/jms/queue/demoQueue</command>
           </commands>
         </beforeDeployment>
      </configuration>

      But I get the following error:

       

      [ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Alpha11:run (default-cli) on project my-project: 
      The server failed to start: Command 'jms-queue add --queue-address=demoQueue --entries=java:/jms/queue/demoQueue' is invalid.
      The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable). -> [Help 1]

       

      This is strange because data-source add works fine and I can see that the messaging subsystem (full profile) is started (I'm seeing logs about the DLQ).

       

      Am I missing something in my configuration?

        • 1. Re: Configuring JMS destinations via wildfly-maven-plugin beforeDeployment/commands
          mnovak

          Hi Xavier,

           

          I don't have experience with wildfly-maven-plugin but this looks like a bug.

           

          Could you try equivalent CLI command:

          /subsystem=messaging-activemq/server=default/jms-queue=demoQueue:add(entries=["java:/jms/queue/demoQueue"])

           

          It could work with this.

           

          Thanks,

          Mirek

          • 2. Re: Configuring JMS destinations via wildfly-maven-plugin beforeDeployment/commands
            xdury

            Hi Miroslav,

             

            Your command is working. I still get the following warning but the queue is created:

             

            WARN: can't find jboss-cli.xml. Using default configuration values.
            Oct 06, 2016 8:14:32 PM org.jboss.as.cli.impl.CommandContextImpl printLine
            INFO: Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
            Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
            20:14:32,309 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 11) AMQ221003: trying to deploy queue jms.queue.demoQueue
            Oct 06, 2016 8:14:32 PM org.jboss.as.cli.impl.CommandContextImpl printLine
            INFO: {"outcome" => "success"}
            {"outcome" => "success"}

            Thanks!

             

            Xavier

            • 3. Re: Configuring JMS destinations via wildfly-maven-plugin beforeDeployment/commands
              mnovak

              Hi Xavier,

               

              good it worked. You can ignore the warnings as they're harmless. afaik you can set path to jboss-cli.xml for example by -Djboss.cli.config=${some_path}/jboss-cli.xml.

               

              Do you you could report issue to jira for wildfly-maven-plugin [1] that it does not work with command - "jms-queue add --queue-address=demoQueue --entries=java:/jms/queue/demoQueue"? I think it's an issue.

               

              [1] WildFly Maven Plugin - JBoss Issue Tracker

               

              Thanks,

              Mirek