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

    Deploying a war file in extension

    Alex Soto Newbie



      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.