title: Arquillian ShrinkWrap Web Archive created differently in different environments
body: <p>I am creating a war file using ShrinkWrap and it works correctly in my development environment when running tests through eclipse and through m2eclipse (maven).</p>
  
  <p>When I run it on Jenkins the war deployment is different and so the tests fail. For example, I am adding custom MANIFEST.MF in the war as manifest resource which is empty on the war created in Jenkins environment.</p>
  
  <p>Any ideas?</p>
  
  <p>Edit: I have tried many different ways to add the MANIFEST.MF, the original code was:</p>
  
  <pre><code> return ShrinkWrap
          .create(WebArchive.class, warName)
          .addClass(DbCleanupManager.class)
          .addAsLibraries(resolveBasicDependencies())
          .addAsWebInfResource(new File(TEST_RESOURCES, "jboss-deployment-structure.xml"))
          .addAsResource("version.properties", "version.properties")
          .addAsResource("logback-test.xml", "logback.xml")
          .addAsManifestResource("MANIFEST.MF");
  </code></pre>
  
  <p>But I have also tried:</p>
  
  <pre><code>.setManifest(
       new StringAsset(
       "Dependencies: org.apache.ws.security,org.apache.cxf,org.apache.cxf.impl,org.jboss.ws.cxf.jbossws-cxf-client\n"));
  </code></pre>
  
  <p>And also trying deleting the MANIFEST.MF first (if it was added by ShrinkWrap) and then adding it to the archive i.e.:</p>
  
  <pre><code>WebArchive war = ShrinkWrap
          .create(WebArchive.class, warName)
          .addClass(DbCleanupManager.class)
          .addAsLibraries(resolveBasicDependencies())
          .addAsWebInfResource(new File(TEST_RESOURCES, "jboss-deployment-structure.xml"))
          .addAsResource("version.properties", "version.properties")
          .addAsResource("logback-test.xml", "logback.xml");
  
      war.delete(ArchivePaths.create("META-INF/MANIFEST.MF"));
      war.addAsManifestResource("MANIFEST.MF");
  </code></pre>
  
  <p>By the way, all the above works fine in my local environment</p>
  
  <p>UPDATE:</p>
  
  <p>I noticed that the only difference between the two wars was the dependency arquillian-jacoco. I forgot that in Jenkins I run the tests using a profile which runs coverage using jacoco.</p>
  
  <p>So the moment I remove the dependenycy (not the profile) the tests pass, the MANIFEST.MF is created correctly.</p>
  
  <p>I suppose that means that jacoco extension somehow messes up MANIFEST.MF?</p>