title: Shrinkwrap addAsLibrary() add library to wrong path
body: <p>I am currently writing some integration tests with Arquillian. Now I'm stuck at a strange problem:</p>
  
  <p>I have a .war archive and want to add a .jar library to it. I do this with myWar.addAsLibrary(myJar). However, like this the myJar is then located at </p>
  
  <pre><code>myWar
   \_ WEB-INF/lib/WEB-INF/lib/myJar.jar
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>myWar
   \_ WEB-INF/lib/myJar.jar
  </code></pre>
  
  <p>I made a workaround that exports the jar to the file system and adds it like this:</p>
  
  <pre><code>myWar.addAsLibrary(new File("/home/metalhamster/myJar.jar"), 
                     new BasicPath("/WEB-INF/lib/myJar.jar"));
  </code></pre>
  
  <p>Has anyone an idea what the problem is? Is it maybe a bug of ShrinkWrap?</p>
  
  <p><hr>
  <strong>EDIT:</strong></p>
  
  <p>What I have tried:</p>
  
  <pre><code>// load original war
  WebArchive myWar = ShrinkWrap.createFromZipFile(WebArchive.class, new File("../wgmdb-web/build/wgmdb-web.war"));
  
  // extract jar from war
  JavaArchive myJar = myWar.getAsType(JavaArchive.class, new BasicPath("/WEB-INF/lib/wgmdb-business.jar"));
  
  /*
   * modify the jar
   */
  
  // replace the jar with the modified version
  myWar.delete(new BasicPath("/WEB-INF/lib/wgmdb-business.jar"));
  myWar.addAsLibrary(myJar);
  </code></pre>
  
  <p>Workaround:</p>
  
  <pre><code>// export jar to file system
  new ZipExporterImpl(myJar).exportTo(new File("/home/metalhamster/wgmdb/wgmdb-business.jar");
  
  // load it again and add it to the war
  war.addAsLibrary(new File("/home/metalhamster/wgmdb/wgmdb-business.jar"), 
                   new BasicPath("/WEB-INF/lib/wgmdb-business.jar"));
  </code></pre>
  
  <p>Cheers 
  metalhamster</p>