Arquillian Error: ArchiveExportException

I ran into a baffling error the other day while working with Arquillian. I added Arquillian to a simple project requiring only the Java SE container for some “lite” CDI injection. However, when I went to run the unit tests, they failed:


[code lang=’java’]
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: File could not be created: target/test.jar
at org.jboss.shrinkwrap.impl.base.exporter.AbstractStreamExporterImpl.getOutputStreamToFile(
at org.jboss.shrinkwrap.impl.base.exporter.AbstractStreamExporterImpl.exportTo(

This didn’t make any sense as the output directories were all writeable etc. I had another similar project that worked. Comparing both projects, I eventually added  a barebones arquillian.xml config file. That did the trick! The magic appears toe be the deploymentExportPath – not sure why this is needed.

[code lang=’xml’]
<arquillian xmlns=";
<property name="deploymentExportPath">target/deployments</property>


Background on project:

  • Gradle build
  • Arquillian dependencies:
    • org.jboss.arquillian:arquillian-bom:1.4.0.Final
    • org.jboss.arquillian.junit:arquillian-junit-container:1.4.0.Final
    • org.jboss.arquillian.container:container-se-managed:1.0.2.Final