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; }
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 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; }