3 Replies Latest reply on Jan 10, 2018 9:10 AM by ozizka

    Running Dropwizard with Arquillian


      I would like to contribute a container for Dropwizard (http://dropwizard.io/). A PoC is already running.


      Dropwizard does not know deployable artifacts. It simply uses all classes in its classpath. So how should I handle deployments?


      One option is to have a empty deployment. But I don't like the idea since this differs from the approach of Arquillian as I understood it. So is there a better way to handle Dropwizard?



        • 1. Re: Running Dropwizard with Arquillian

          Hi Oliver,


          very interesting idea. I'm not familiar with Dropwizard but I believe that right approach would be to implement generic Archive<?> (e.g DropWizard archive) and provide some Java API to create Application class.

          This way you can easily modify Dropwizard configuration directly from tests.


          • 2. Re: Running Dropwizard with Arquillian

            Hi Karel,


            I think is is possible and not so difficult. But how can I ensure to use unly artifacts from this archive when running Dropwizard? Does Arquillian provide some generic/easy way to change the classloading?



            • 3. Re: Running Dropwizard with Arquillian

              Hi Oliver, Dropwizard doesn't have a concept of classloaders, or better said, the point is to avoid them.

              There is no concept of deploying and undeploying AFAIK. Typical setup is to bundle all classes to one shaded jar.

              So, there is no smart way to leverage Arquillian's purpose to be a quick way of shooting test deployments to the server.

              I think the idiomatic way to go with arquillian would be to add the whole dropwizard uber-jar and all your dependencies to the test archive, for each single test.

              It's doable but not too practical.


              One way to try could be having dropwizard unzipped, and in an Arquillian container implementation, overlay the test deployment classes in that directory and remove them and restart DropWizard, as a way of deploying.

              1 of 1 people found this helpful