/** * Returns the classpath URIs for this archive. * * @param archive file * @return classpath URIs for this archive */ @Override public List<URI> getClassPathURIs(ReadableArchive archive) { List<URI> uris = super.getClassPathURIs(archive); try { File archiveFile = new File(archive.getURI()); if (archiveFile.exists() && archiveFile.isDirectory()) { uris.add(new URI(archive.getURI().toString()+"WEB-INF/classes/")); File webInf = new File(archiveFile, "WEB-INF"); File webInfLib = new File(webInf, "lib"); if (webInfLib.exists()) { uris.addAll(ASClassLoaderUtil.getLibDirectoryJarURIs(webInfLib)); } } } catch (Exception e) { logger.log(Level.WARNING, e.getMessage(), e); } return uris; } }
public List<URL> getManifestLibraries(DeploymentContext context) { try { Manifest manifest = getManifest(context.getSource()); return DeploymentUtils.getManifestLibraries(context, manifest); }catch (IOException ioe) { _logger.log(Level.WARNING, "Exception while getting manifest classpath: ", ioe); return new ArrayList<URL>(); } }
@Override public void expand(ReadableArchive source, WritableArchive target, DeploymentContext context) throws IOException { super.expand(source, target, context);