2 Replies Latest reply on Jun 26, 2013 10:10 AM by napu

    Arquillian Final/ShrinkWrap: Exclude "vanilla" test classes from src/test/java

    napu Newbie

      Hi!

       

      My problem manifested itself with CR7 (if I remember correctly): When creating an archive using the addPackages method, also the XxxTest classes are added from src/test/java and they cause the tests to fail.

       

      (The failure itself is quite weird: a ClassNotFoundException in the JBoss server (7.1.1.) window.)

       

      I can of course avoid the problem e.g. by filtering as in the following example or by using single addClass methods:

       

      {code}WebArchive paketti = ShrinkWrap.create(WebArchive.class,

                  "test.war")

                  .addPackages(false, Filters.exclude(XxxUnitTest.class),

                        Book.class.getPackage(),

                        Another.class.getPackage())

                  .addAsWebInfResource("META-INF/beans-arquillian.xml", "beans.xml");

      {code}

       

       

      Both these solutions are tedious as JPA classes contain references to other JPA classes and there will either be a horrendous amount of single addClass methods or a rather big amount of excudes.

       

      Best Regards, /napu