/** * Flatten a container in the output list. (e.g. expand any libraries). * * @param container the container to flatten * @param list the result list */ public static void flatten(Container container, List<Container> list) throws Exception { if (container.getType() == TYPE.LIBRARY) { flatten(container.getMembers(), list); } else list.add(container); }
/** * Flatten a container in the output list. (e.g. expand any libraries). * * @param container the container to flatten * @param list the result list */ public static void flatten(Container container, List<Container> list) throws Exception { if (container.getType() == TYPE.LIBRARY) { flatten(container.getMembers(), list); } else list.add(container); }
/** * Flatten a container in the output list. (e.g. expand any libraries). * * @param container the container to flatten * @param list the result list */ public static void flatten(Container container, List<Container> list) throws Exception { if (container.getType() == TYPE.LIBRARY) { flatten(container.getMembers(), list); } else list.add(container); } /**
/** * Flatten a container in the output list. (e.g. expand any libraries). * * @param container the container to flatten * @param list the result list */ public static void flatten(Container container, List<Container> list) throws Exception { if (container.getType() == TYPE.LIBRARY) { flatten(container.getMembers(), list); } else list.add(container); } /**
container.getError()); } else { Collection<Container> members = container.getMembers(); for (Container m : members) { String path = m.getFile().getAbsolutePath();
private void verifyDependencies(String title, Collection<Container> path) throws Exception { List<String> msgs = new ArrayList<String>(); for (Container c : new ArrayList<Container>(path)) { for (Container cc : c.getMembers()) { if (cc.getError() != null) msgs.add(cc + " - " + cc.getError()); else if (!cc.getFile().isFile() && !cc.getFile().equals(cc.getProject().getOutput()) && !cc.getFile().equals(cc.getProject().getTestOutput())) msgs.add(cc + " file does not exists: " + cc.getFile()); } } if (msgs.isEmpty()) return; error("%s: has errors: %s", title, Strings.join(msgs)); }
private void verifyDependencies(String title, Collection<Container> path) throws Exception { List<String> msgs = new ArrayList<String>(); for (Container c : new ArrayList<Container>(path)) { for (Container cc : c.getMembers()) { if (cc.getError() != null) msgs.add(cc + " - " + cc.getError()); else if (!cc.getFile().isFile() && !cc.getFile().equals(cc.getProject().getOutput()) && !cc.getFile().equals(cc.getProject().getTestOutput())) msgs.add(cc + " file does not exists: " + cc.getFile()); } } if (msgs.isEmpty()) return; error("%s: has errors: %s", title, Strings.join(msgs)); }
public void addClasspath(Container container) throws Exception { if (container.getError() != null) { project.error("Cannot launch because %s has reported %s", container.getProject(), container.getError()); } else { Collection<Container> members = container.getMembers(); for (Container m : members) { String path = m.getFile().getAbsolutePath(); if (!classpath.contains(path)) { classpath.add(path); Manifest manifest = m.getManifest(); if (manifest != null) { Parameters exports = project.parseHeader(manifest.getMainAttributes().getValue( Constants.EXPORT_PACKAGE)); for (Entry<String,Attrs> e : exports.entrySet()) { if (!runsystempackages.containsKey(e.getKey())) runsystempackages.put(e.getKey(), e.getValue()); } // Allow activators on the runpath. They are called // after // the framework is completely initialized wit the // system // context. String activator = manifest.getMainAttributes().getValue(EMBEDDED_ACTIVATOR); if (activator != null) activators.add(activator); } } } } }
private void verifyDependencies(String title, Collection<Container> path) throws Exception { List<String> msgs = new ArrayList<>(); for (Container c : new ArrayList<>(path)) { for (Container cc : c.getMembers()) { if (cc.getError() != null) msgs.add(cc + " - " + cc.getError()); else if (!cc.getFile() .isFile() && !cc.getFile() .equals(cc.getProject() .getOutput()) && !cc.getFile() .equals(cc.getProject() .getTestOutput())) msgs.add(cc + " file does not exists: " + cc.getFile()); } } if (msgs.isEmpty()) return; error("%s: has errors: %s", title, Strings.join(msgs)); }
List<Container> containers = getMembers(); for (Container container : containers) { if (!container.contributeFiles(files, reporter))
private void verifyDependencies(String title, Collection<Container> path) throws Exception { List<String> msgs = new ArrayList<>(); for (Container c : new ArrayList<>(path)) { for (Container cc : c.getMembers()) { if (cc.getError() != null) msgs.add(cc + " - " + cc.getError()); else if (!cc.getFile() .isFile() && !cc.getFile() .equals(cc.getProject() .getOutput()) && !cc.getFile() .equals(cc.getProject() .getTestOutput())) msgs.add(cc + " file does not exists: " + cc.getFile()); } } if (msgs.isEmpty()) return; error("%s: has errors: %s", title, Strings.join(msgs)); }
List<Container> containers = getMembers(); for (Container container : containers) { if (!container.contributeFiles(files, reporter))
List<Container> containers = getMembers(); for (Container container : containers) { if (!container.contributeFiles(files, reporter))
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(container.getFile().getAbsolutePath()); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(container.getFile().getAbsolutePath()); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(container.getFile().getAbsolutePath()); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(container.getFile().getAbsolutePath()); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(IO.absolutePath(container.getFile())); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
private void add(List<String> paths, Container container) throws Exception { if (container.getType() == Container.TYPE.LIBRARY) { List<Container> members = container.getMembers(); for (Container sub : members) { add(paths, sub); } } else { if (container.getError() == null) paths.add(IO.absolutePath(container.getFile())); else { paths.add("<<${repo} = " + container.getBundleSymbolicName() + "-" + container.getVersion() + " : " + container.getError() + ">>"); if (isPedantic()) { warning("Could not expand repo path request: %s ", container); } } } }
output.putResource(name, new FileResource(c.getFile())); trace("store library %s", name); for (Container child : c.getMembers()) { trace("store member %s", child); addContainer(skip, output, child);