Arquillian and TomEE: deploy remotely without hacks!


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!

Advertisements

One thought on “Arquillian and TomEE: deploy remotely without hacks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s