ActiveMQ
  1. ActiveMQ
  2. AMQ-4140

maven-activemq-plugin fails to resolve path to XBean file in multi-module builds, and does not have a skip flag

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.7.0
    • Fix Version/s: 5.8.0
    • Component/s: Broker
    • Labels:
    • Environment:

      Windows and Linux

    • Patch Info:
      Patch Available

      Description

      Hi,

      I am using ActiveMQ and have some integration tests leveraging the maven-activemq-plugin.

      I have found that:

      1. path to XBean files are not resolved properly, as:

      • the path is relative, and therefore, multi-module builds fail;
      • at least under Windows, the generated path is not a valid URL, hence the plugin fails on this call: final BrokerService broker = BrokerFactory.createBroker(configUri);

      2. unlike other Maven plugins, maven-activemq-plugin doesn't follow the convention of having a skip flag, to skip execution under some circumstances. This is not a bug, but rather an improvement that would make users' life easier IMO (and at least, mine).

      In the attachments, I have provided:

      • a multi-module build that would allow you to easily and systematically replicate the above two issues: maven-activemq-plugin-user-acceptance-test.zip
      • a "fixed" version of maven-activemq-plugin, based on trunk / 5.8-SNAPSHOT (as of 2012/10/28 06:34 BST): maven-activemq-plugin.zip
      • a patch, containing the equivalent fix, in case this format is preferred: maven-activemq-plugin.patch

      I hope this will help to have this resolved in a 5.7.1 or 5.8 version of the plugin very soon?

      Cheers,

      M.

      P.S. : In case you need committers, I would be happy to occasionally help.
      (I noticed the documentation for this plugin is rather outdated, so could help with that at least)

      1. maven-activemq-plugin.patch
        7 kB
        Marc Carré
      2. maven-activemq-plugin.zip
        6 kB
        Marc Carré
      3. maven-activemq-plugin-5.7.0-patched.zip
        6 kB
        Marc Carré
      4. maven-activemq-plugin-user-acceptance-test.zip
        3 kB
        Marc Carré

        Issue Links

          Activity

          Hide
          Timothy Bish added a comment -

          Gave the patch a quick spin, the unit test fails on my Linux platform, you should try this out on a Non-Windows machine and see what other issues might exist.

          Show
          Timothy Bish added a comment - Gave the patch a quick spin, the unit test fails on my Linux platform, you should try this out on a Non-Windows machine and see what other issues might exist.
          Hide
          Marc Carré added a comment - - edited

          My apologies for not having double-checked this case earlier.
          I have re-uploaded a new version tested under:

          • Linux
          • Windows

          and which passes the unit tests and the attached user acceptance tests, under both the two OS:

          • multi-module build (maven-activemq-plugin-client-multimodule),
          • single/simple module (maven-activemq-plugin-client-simple).
          Show
          Marc Carré added a comment - - edited My apologies for not having double-checked this case earlier. I have re-uploaded a new version tested under: Linux Windows and which passes the unit tests and the attached user acceptance tests, under both the two OS: multi-module build (maven-activemq-plugin-client-multimodule), single/simple module (maven-activemq-plugin-client-simple).
          Hide
          Timothy Bish added a comment -

          Patch applied with thanks.

          Show
          Timothy Bish added a comment - Patch applied with thanks.
          Hide
          Marc Carré added a comment -

          Thanks Timothy!

          Show
          Marc Carré added a comment - Thanks Timothy!
          Hide
          Marc Carré added a comment -

          Attached 5.7.0 patched, with a modified POM which plays well with the rest of the 5.7.0 modules, in case some people want to deploy them to their repo using:

          mvn deploy:deploy-file -DpomFile=pom.xml -Dfile=maven-activemq-plugin-5.7.0-patched.jar -DgroupId=org.apache.activemq.tooling -DartifactId=maven-activemq-plugin -Dversion=5.7.0-patched -Dpackaging=jar -DrepositoryId=My-Release-Repo -Durl=http://host:port/nexus/content/repositories/releases
          Show
          Marc Carré added a comment - Attached 5.7.0 patched, with a modified POM which plays well with the rest of the 5.7.0 modules, in case some people want to deploy them to their repo using: mvn deploy:deploy-file -DpomFile=pom.xml -Dfile=maven-activemq-plugin-5.7.0-patched.jar -DgroupId=org.apache.activemq.tooling -DartifactId=maven-activemq-plugin -Dversion=5.7.0-patched -Dpackaging=jar -DrepositoryId=My-Release-Repo -Durl=http: //host:port/nexus/content/repositories/releases

            People

            • Assignee:
              Timothy Bish
              Reporter:
              Marc Carré
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development