arquillian + shrinkwrap + seam: how to create deployment package
<p>I have a seam 2.2.2 aplication which I'm migrating to jboss eap 6 (AS7).
As the tests were in the old jboss embedded container, so I started to use arquillian but I could not discover hot to create a deployment package.</p>

<p>This is one of my attempts:</p>

<pre><code>@Deployment
@OverProtocol("Servlet 3.0") 
public static Archive&lt;?&gt; createDeployment() throws IOException {

    // Build the ear with Maven by hand before run the test!
    final EnterpriseArchive ear = ShrinkWrap.createFromZipFile(
           EnterpriseArchive.class, new File("../Sin-ear/target/Sin.ear"));

    final JavaArchive testjar = ShrinkWrap.createFromZipFile(
           JavaArchive.class, new File("./target/test.jar"));
    //final JavaArchive testjar = ShrinkWrap.create(JavaArchive.class, "test.jar") //other attempt
    //     .addPackages(true, "com.miles.knowledge.test");

    ear.addAsModule(testjar);
    return ear;
}
</code></pre>

<p>And it fails when I run the test class as JUnit test (I can see the aplication deployment with no errors):</p>

<pre><code>java.lang.ClassNotFoundException: com.miles.knowledge.test.GreeterTest from [Module "deployment.Sin.ear.Sin.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
    ...
</code></pre>

<p>It seems that I have to package the test class into a war package, but I'm kind of lost, I need some help.</p>