1 Reply Latest reply on May 8, 2014 6:22 AM by asotobu

    Deploying a war file in extension

    asotobu

      Hello,

       

      I am deploying an arquillian-extension which basically apart from creating some resources for the users (so they don't need to repeat the same code for all tests), it deploys a war as well to the server. So basicaly when running the test there will be two web applications deployed on server, the first one the application itself and the other one the web application deployed by the extension.

       

      To do that basically I subscribe to AfterDeploy event and then I deploy the application. Basically I get the deployable container from the event and I call the deploy method.

       

      This class is registered on LoadableExtension.

       

      It works perfectly when the test is run as client, but when the test is run within container, an exception is thrown by server (Apache TomEE) that an application with same id is already deployed. Adding a debug point to the deploy method it is only called once so I am not pretty sure where it is the problem.

       

      Thank you so much.

        • 1. Re: Deploying a war file in extension
          asotobu

          I update the information because of twitter conversation:

           

          You can find the project here: lordofthejars/arquillian-multiple-war · GitHub

           

          It works with Wildfly remote(and managed) and with Apache TomEE Remote (which in fact is equivalent to managed), but it doesn't work with Apache TomEE embedded. It seems a bug between Arquillian and Arquillian-TomEE integration as noted in this issue: https://t.co/pSCn9y9b3A

           

          The profile that it crashes is called tomee-embedded.

           

          Basically I need this feature to implement some kind of generic stubbing server extension for arquillian.

           

          Alex.