2 Replies Latest reply on Jun 21, 2013 6:20 AM by Petr Mensik

    Deploy two archives with same name

    Petr Mensik Newbie

      Hello guys,

       

      is there a way how to use two deployment methods with the same Archive name?I have something like this

       

          @Deployment(testable = false, name = "classic", order = 1)

          public static WebArchive createDeployment() {

              return getArchive();

          }

       

          @Deployment(testable = false, name = "alternative", order = 2)

          public static WebArchive createAlternativeDeployment() {

              WebArchive archive = getArchive();

              archive.delete("WEB-INF/beans.xml");

              archive.addAsWebInfResource(new File("src/test/resources/beans.xml"));

              return archive;

          }

       

          private static WebArchive getArchive() {

              return ShrinkWrap.createFromZipFile(WebArchive.class, new File("target/CDIPortlet.war"));

          }

       

      and what I would like to (ideally) do is to execute classic deployment, then all test methods which operates on it, undeploy, execute alternative deployment and run rest of the tests. Is something like that possible?My problem is that I don't want to change my archive name because it matters to the portal environment and I would have to change other things just to make my one "alternative" test method work.

       

      Thanks a lot for tips.