-
1. Re: Running Dropwizard with Arquillian
kpiwko Oct 13, 2014 10:16 AM (in response to plexusnexus)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.
Karel
-
2. Re: Running Dropwizard with Arquillian
plexusnexus Oct 18, 2014 5:10 AM (in response to kpiwko)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?
Oliver
-
3. Re: Running Dropwizard with Arquillian
ozizka Jan 10, 2018 9:10 AM (in response to plexusnexus)1 of 1 people found this helpfulHi 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.