12 Replies Latest reply on Dec 12, 2011 8:06 AM by Aslak Knutsen

    Dynamic deployments

    Bartosz Majsak Master

      Hi guys,

       

      I would like to achieve dynamic deployment. It might be really useful for persistence extension where each test might have different data sets and different formats which also affects dependencies which must be deployed along with the core extension (like Excel or Yaml parsers). I also don't want to force users to store their data sets in the fixed location and more importantly I don't want to make huge jar with stuff which not used at all

       

      If I understand correctly I cannot inject class under test to the AuxiliaryArchiveAppender. So I dig a little bit in the Arquillian code and found possible solution. I can listen for GenerateDeployment event after DeploymentGenerator, and inject in my dynamic appender:

      {code}@Inject @ClassScoped

      Instance<DeploymentScenario> deployment;{code}

      Then I can have access to list of all Deployments which contain of DeploymentDescription and thus all the archives which are generated.

       

      Is it the right direction? Or maybe I can achieve it in easier way?

       

      Thanks a lot for all suggestions!