@Override protected void initInternal() throws LifecycleException { try (JarFile warFile = new JarFile(getBase())) { JarEntry jarFileInWar = warFile.getJarEntry(archivePath); InputStream jarFileIs = warFile.getInputStream(jarFileInWar); try (JarInputStream jarIs = new JarInputStream(jarFileIs)) { setManifest(jarIs.getManifest()); } } catch (IOException ioe) { throw new IllegalArgumentException(ioe); } try { setBaseUrl(UriUtil.buildJarSafeUrl(new File(getBase()))); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } }
@Override protected void initInternal() throws LifecycleException { try (JarFile warFile = new JarFile(getBase())) { JarEntry jarFileInWar = warFile.getJarEntry(archivePath); InputStream jarFileIs = warFile.getInputStream(jarFileInWar); try (JarInputStream jarIs = new JarInputStream(jarFileIs)) { setManifest(jarIs.getManifest()); } } catch (IOException ioe) { throw new IllegalArgumentException(ioe); } try { setBaseUrl(UriUtil.buildJarSafeUrl(new File(getBase()))); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } }
@Override protected void initInternal() throws LifecycleException { try (JarFile jarFile = JreCompat.getInstance().jarFileNewInstance(getBase())) { setManifest(jarFile.getManifest()); } catch (IOException ioe) { throw new IllegalArgumentException(ioe); } try { setBaseUrl(UriUtil.buildJarSafeUrl(new File(getBase()))); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } } }
@Override protected void initInternal() throws LifecycleException { try (JarFile jarFile = JreCompat.getInstance().jarFileNewInstance(getBase())) { setManifest(jarFile.getManifest()); } catch (IOException ioe) { throw new IllegalArgumentException(ioe); } try { setBaseUrl(UriUtil.buildJarSafeUrl(new File(getBase()))); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } } }