public List<URL> process(URL url, List<Library> libraries) throws IOException { List<URL> classpath = new ArrayList<URL>(); // add the the jar itself to the classpath classpath.add(url); // add libraries from the jar addLibraries(classpath, url); return classpath; }
public FileSystemResource createResource(File file) { if (!file.getName().endsWith(".war")) { return null; } JarFile jarFile = null; try { jarFile = new JarFile(file.getCanonicalPath()); JarEntry entry = jarFile.getJarEntry("WEB-INF/sca-contribution.xml"); if (entry == null) { return null; } } catch (FileNotFoundException e) { // no sca-contribution, ignore monitor.noManifest(); return null; } catch (IOException e) { throw new AssertionError(e); } finally { try { if (jarFile != null) { jarFile.close(); } } catch (IOException e) { // ignore } } return new FileResource(file); } }
public List<URL> process(Contribution contribution) throws Fabric3Exception { URL url = contribution.getLocation(); List<Library> libraries = contribution.getManifest().getLibraries(); List<URL> classpath = new ArrayList<>(); // add the the jar itself to the classpath classpath.add(url); if (libraries.isEmpty() && !hasLibDirectory(new File(url.getFile()), "lib") && !hasLibDirectory(new File(url.getFile()), "classes")) { return classpath; } try { // add libraries from the jar addLibraries(classpath, url); } catch (IOException e) { throw new Fabric3Exception(e); } return classpath; }
if (exclude(manifest, entry)) { continue;
public void index(Resource resource, XMLStreamReader reader, IntrospectionContext context) { QNameSymbol symbol = new QNameSymbol(qname); WebXml webXml = new WebXml(); ResourceElement<QNameSymbol, WebXml> element = new ResourceElement<QNameSymbol, WebXml>(symbol, webXml); resource.addResourceElement(element); }
public List<URL> process(Contribution contribution) throws Fabric3Exception { URL url = contribution.getLocation(); List<Library> libraries = contribution.getManifest().getLibraries(); List<URL> classpath = new ArrayList<>(); // add the the jar itself to the classpath classpath.add(url); if (libraries.isEmpty() && !hasLibDirectory(new File(url.getFile()), "lib") && !hasLibDirectory(new File(url.getFile()), "classes")) { return classpath; } try { // add libraries from the jar addLibraries(classpath, url); } catch (IOException e) { throw new Fabric3Exception(e); } return classpath; }
if (exclude(manifest, entry)) { continue;
public FileSystemResource createResource(File file) { if (!file.getName().endsWith(".war")) { return null; } JarFile jarFile = null; try { jarFile = new JarFile(file.getCanonicalPath()); JarEntry entry = jarFile.getJarEntry("WEB-INF/sca-contribution.xml"); if (entry == null) { return null; } } catch (FileNotFoundException e) { // no sca-contribution, ignore monitor.noManifest(); return null; } catch (IOException e) { throw new AssertionError(e); } finally { try { if (jarFile != null) { jarFile.close(); } } catch (IOException e) { // ignore } } return new FileResource(file); } }
if (exclude(manifest, entry)) { continue;