Manuel
Manuel

Reputation: 235

Add /src/main/java folder to Arquillian for deployment

I want to add all java packages (and classes) from src/main/java folder to the Arquillian deployment, as follow:

@RunWith(Arquillian.class)
public class ArquillianDeployment {

@Deployment
public static Archive<?> deploy() {
    return ShrinkWrap.create(WebArchive.class, "test.war")
            .// add here all java packages from src/main/java folder
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}

Upvotes: 0

Views: 181

Answers (1)

juvenislux
juvenislux

Reputation: 300

You can use addPackages instead.

ShrinkWrap.create(WebArchive.class, "test.war")
    .addPackages(true, "my.rootPackage");

Upvotes: 1

Related Questions