@Test public void buildWar() throws MalformedURLException, IOException { war = localCopy(warProbe().library("target/classes")); assertThat(war.getEntry("WEB-INF/beans.xml"), is(notNullValue())); assertThat(war.getEntry("WEB-INF/lib/pax-exam-spi-" + Info.getPaxExamVersion() + ".jar"), is(notNullValue())); }
public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuilder builder = new ZipBuilder(probeWar); for (String library : option.getLibraries()) { File file = toLocalFile(library); if (file.isDirectory()) { file = toJar(file); } LOG.debug("including library {} = {}", library, file); builder.addFile(file, "WEB-INF/lib/" + file.getName()); } builder.addDirectory(webResourceDir, ""); builder.close(); URI warUri = probeWar.toURI(); LOG.info("WAR probe = {}", warUri); return warUri; } catch (IOException exc) { throw new TestContainerException(exc); } }
WarBuilder { public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuilder builder = new ZipBuilder(probeWar); for (String library : option.getLibraries()) { File file = toLocalFile(library); if (file.isDirectory()) { file = toJar(file); } LOG.debug("including library {} = {}", library, file); builder.addFile(file, "WEB-INF/lib/" + file.getName()); } builder.addDirectory(webResourceDir, ""); builder.close(); URI warUri = probeWar.toURI(); LOG.info("WAR probe = {}", warUri); return warUri; } catch (IOException exc) { throw new TestContainerException(exc); } } }
WarBuilder { public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuilder builder = new ZipBuilder(probeWar); for (String library : option.getLibraries()) { File file = toLocalFile(library); if (file.isDirectory()) { file = toJar(file); } LOG.debug("including library {} = {}", library, file); builder.addFile(file, "WEB-INF/lib/" + file.getName()); } builder.addDirectory(webResourceDir, ""); builder.close(); URI warUri = probeWar.toURI(); LOG.info("WAR probe = {}", warUri); return warUri; } catch (IOException exc) { throw new TestContainerException(exc); } } WarBuilder(File tempDir, WarProbeOption option); }
WarBuilder { public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuilder builder = new ZipBuilder(probeWar); for (String library : option.getLibraries()) { File file = toLocalFile(library); if (file.isDirectory()) { file = toJar(file); } LOG.debug("including library {} = {}", library, file); builder.addFile(file, "WEB-INF/lib/" + file.getName()); } builder.addDirectory(webResourceDir, ""); builder.close(); URI warUri = probeWar.toURI(); LOG.info("WAR probe = {}", warUri); return warUri; } catch (IOException exc) { throw new TestContainerException(exc); } } WarBuilder(File tempDir, WarProbeOption option); URI buildWar(); }
WarBuilder { public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuilder builder = new ZipBuilder(probeWar); for (String library : option.getLibraries()) { File file = toLocalFile(library); if (file.isDirectory()) { file = toJar(file); } LOG.debug("including library {} = {}", library, file); builder.addFile(file, "WEB-INF/lib/" + file.getName()); } builder.addDirectory(webResourceDir, ""); builder.close(); URI warUri = probeWar.toURI(); LOG.info("WAR probe = {}", warUri); return warUri; } catch (IOException exc) { throw new TestContainerException(exc); } } WarBuilder(File tempDir, WarProbeOption option); URI buildWar();  }