3

I have a prebuild WAR-archive, which contains all my needed structure of the WAR to deploy with Arquillian. So I am creating a WAR-Archive in Arquillian based on this prebuild war file.

ShrinkWrap.createFromZipFile(WebArchive.class, new File(myWarDir, "myWar.war"));

Now I want to update some JAR files and all class files inside the Arquillian WAR-Archive.

How can I replace all classes from WEB-INF/classes with classes from a specific folder?

Same question is to specific jar files in WEB-INF/lib. How can I replace specific jar files?

Same question to any other resource in the WebArchive?

cilap
  • 2,215
  • 1
  • 25
  • 51

1 Answers1

0

The API is the same here - you'll get back a WebArchive, you simply need to delete the appropriate paths before you add to it again.

John Ament
  • 11,595
  • 1
  • 36
  • 45
  • Do not get it fully. Do you say I have to extract first the war-file into filesystem and do delete the unwished files manually? Or more to use this? http://docs.jboss.org/shrinkwrap/1.0.0-cr-3/org/jboss/shrinkwrap/api/Archive.html#delete(org.jboss.shrinkwrap.api.ArchivePath) But in the last case, how can I get the full set of all class-files or the wished jar-files in the WebArchive? – cilap Nov 26 '14 at 10:13