Arquillian is a great way to deploy an application in a container to test it. However the framework itself doesn’t know if the container is local or remote. TomEE adapter (the bridge between arquillian and tomee) was supporting local deployment but remote one was quite hard and needed to workaround a bit arquillian which was not that fancy.
Since yesterday you can do it easily!
For that purpose you simply add in your arquillian.xml the property deployerProperties with the value openejb.deployer.binaries.use=true:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <container qualifier="tomee-1"> <configuration> <property name="httpPort">-1</property> <property name="stopPort">-1</property> <property name="ajpPort">-1</property> <property name="version">${tomee.version}</property> <property name="dir">target/apache-tomee-remote-1</property> <property name="appWorkingDir">target/arquillian-test-working-dir-1</property> <property name="deployerProperties">openejb.deployer.binaries.use=true</property> </configuration> </container> </arquillian>
Behind the scene TomEE adapter will just copy in memory the archive to deploy and send it over the server which will dump it locally in temp folder (tomee/temp by default) and finally the server will deploy this dump.
Happy hacking with TomEE and happy new year everyone!
Just great 🙂