我想将src / main / java文件夹中的所有java包(和类)添加到Arquillian部署中,如下所示:
@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");
}
答案 0 :(得分:0)
您可以改为使用addPackages
。
ShrinkWrap.create(WebArchive.class, "test.war")
.addPackages(true, "my.rootPackage");