Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-2293

ActiveMQ Maven plugin fails to spin up broker in multi module project


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.8.0
    • Component/s: None
    • Labels:
    • Environment:

      Windows ONLY

    • Patch Info:
      Patch Available


      If one attampts to specify an absolute path the the activemq configuration file in a maven project using the maven parameters:


      the broker will fail because ${basedir} in maven does not expand to a valid URI string.

      Tried as well:
      2) Using the xbeam:conf/activemq.xml does not work either as the mojo does not contain the directory on the classpath.

      3) Using the base dir and setting the configURI to xbean:file:///./src/test/qctivemq/conf/activemq.xml does work when executing the test phase within a single maven project but as soon as the activemq plugin is run from a module that is part of a project (see attachment example) then the . refers to the path of the parent project and the broker fails to find the file again.

      As far as I can see there is not really a sufficient workaround using the activemq.base activemq.home system properties and hence I propose to add another configuration alternative to the maven-activemq-plugin called configFile. This can then be set with the according absolute reference and the URI is properly constructred using the underlying JVM java.io.File.toURI(). Patch attached.

      The logic implemented by the patch is, if a configFile is set on the activemq plugin then it will construct a xbean:file:[uri] else it will use configUri (as usual).


        1. AMQ-2293.patch
          2 kB
          Niels Bertram
        2. example.zip
          3 kB
          Damian Hudson
        3. pom.xml
          5 kB
          Christian Posta
        4. test-project.zip
          37 kB
          Niels Bertram

          Issue Links



              • Assignee:
                davsclaus Claus Ibsen
                nbertram Niels Bertram
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: