title: Setting Datasource in arquillian
body: <p>So, I have a project which uses persistence.xml in main,
  it is in src/main/resources/META-INF</p>
  
  <p>Now i want to use an in-memory database (H2) in writing automated unit test so i need to have another persistence.xml, i have it in src/test/resouce/META-INF</p>
  
  <p>So my question is how can i over-ride the first persistence,</p>
  
  <p>I am also using shrikwrap resolver to resolve all dependencies from pom.xml, so it resolves it all and i add it to shrikwrap to return WebArchive, is there any way, i tried many such as creating profile or maven filetering but doesnt work with Arquillian as i resolve everything and add to deployment.</p>
  
  <p>You can find my Arquillian deployment below : </p>
  
  <pre><code>    WebArchive[] file = Maven.resolver().loadPomFromFile("pom.xml")
              .resolve("G:A:V").withTransitivity().as(WebArchive.class);
  
      WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war")
              .addAsResource("META-INF/persistence.xml")
              .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
  
      war.addAsLibraries(file);
  
      return war;
  </code></pre>