Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-659

Testclass is missing in test.ear when bundling EnterpriseArchive with Arquillian.

    Details

      Description

      if shrink wrapping in the following way:

          @Deployment
          public static EnterpriseArchive createTestArchive() {
      
              JavaArchive jar = ShrinkWrap.create(JavaArchive.class,"test.jar").addClasses(
                      SomeClass1.class,
                      SomeClass2.class)
                      .addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
              
              File file = new File("src/test/resources/arquillian-application.xml");
              
              EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
                      .addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
                      .artifact("org.demo.test:util:1.0-SNAPSHOT").resolveAs(GenericArchive.class))
                      .setApplicationXML(file)
                      .addAsLibraries(jar)
      
              return ear;
          }
      

      then the actual test class (the one extending Arquillian.class) is nowhere to be found in

      test.ear

      .
      This means a "no class def found" exception is beeing thrown by the container upon test execution after deployment.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bmajsak Bartosz Majsak
                Reporter:
                hpgisler Hanspeter Gisler
              • Votes:
                7 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: