2 Replies Latest reply on Sep 17, 2012 12:10 PM by Andrew Rubinger

    Shrinkwrap usage question (EAR patching)

    Michael Boitet Newbie

      Hi all,


      Here is what I would like to perform when preparing deployment of an Arquillian test (hopefully it's possible):

           1 - Get an ear from my local maven Repo

           2 - extract a given jar from this ear

           3 - update Manifest.MF embeded in the jar by replacing it by my own

           4 - update the ear with the modified jar


      I am struggling with the last step, meaning I cannot add my jar into the ear...


      here is my code so far :

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

          public static EnterpriseArchive createDeploymentForEmsWorkflowServices() {

              EnterpriseArchive ear = DependencyResolvers






              JavaArchive ejbJar = ear.getAsType(JavaArchive.class, EMBEDED_EJB_NAME, ArchiveFormat.ZIP);


                //STEP 4 => REINTGRATE PATCHED JAR

           return ear;



      I could not find any samples by googling , so any help would be welcome.