1 Reply Latest reply on Jun 28, 2013 12:19 PM by Aslak Knutsen

    Auxiliary Archives in EAR or testable war? (Warp related)

    Robert Panzer Newbie

      Hi Arquillian Devs,


      I am currently trying to get into Warp and stumbled upon the fact that EARs do not seem to be supported.

      If I am not totally wrong the reason is that the requests over the CommandBus are answered with 404.


      I've debugged into the code and found that the arquillian-warp.jar is added as a library to the ear instead of the war so that the servlet is not deployed. (Protocol is Servlet 3.0)


      In arquillian-core I've found this code in ServletDeploymentPackager and wondered why it should not be a good idea to add these archives to the war?


         private Archive<?> handleArchive(EnterpriseArchive applicationArchive, Collection<Archive<?>> auxiliaryArchives, JavaArchive protocol, Processor processor, TestDeployment testDeployment)


            Map<ArchivePath, Node> applicationArchiveWars = applicationArchive.getContent(Filters.include(".*\\.war"));

            if(applicationArchiveWars.size() == 1)


               ArchivePath warPath = applicationArchiveWars.keySet().iterator().next();




                        applicationArchive.getAsType(WebArchive.class, warPath),

                        new ArrayList<Archive<?>>(), // reuse the War handling, but Auxiliary Archives should be added to the EAR, not the WAR ??? Why




               catch (IllegalArgumentException e)


                  throw new IllegalArgumentException("Can not manipulate war's that are not of type " + WebArchive.class, e);




      I've tried adding the auxiliary jars to the embedded war and the warp test case worked with an ear!


      From a naive users point of view that makes sense as the test cases on the server are initiated in the embedded war.


      Does that make sense to you?


      If you think this approach is ok, I would like to prepare a pull request for this.


      Kind regards,