/** * Get the manifest and write it out separately if -savemanifest is set * * @param dot */ private void doSaveManifest(Jar dot) throws Exception { String output = getProperty(SAVEMANIFEST); if (output == null) return; File f = getFile(output); if (f.isDirectory()) { f = new File(f, "MANIFEST.MF"); } f.delete(); f.getParentFile().mkdirs(); OutputStream out = new FileOutputStream(f); try { Jar.writeManifest(dot.getManifest(), out); } finally { out.close(); } changedFile(f); }
public Resource make(Builder builder, String destination, Map<String, String> argumentsOnMake) throws Exception { String type = argumentsOnMake.get("type"); if (!type.equals("copy")) return null; String from = argumentsOnMake.get("from"); if (from == null) { String content = argumentsOnMake.get("content"); if (content == null) throw new IllegalArgumentException( "No 'from' or 'content' field in copy " + argumentsOnMake); return new EmbeddedResource(content.getBytes("UTF-8"),0); } else { File f = builder.getFile(from); if (f.isFile()) return new FileResource(f); else { try { URL url = new URL(from); return new URLResource(url); } catch(MalformedURLException mfue) { // We ignore this } throw new IllegalArgumentException( "Copy source does not exist " + from + " for destination " + destination); } } }
public Resource make(Builder builder, String destination, Map<String, String> argumentsOnMake) throws Exception { String type = argumentsOnMake.get("type"); if (!type.equals("copy")) return null; String from = argumentsOnMake.get("from"); if (from == null) { String content = argumentsOnMake.get("content"); if (content == null) throw new IllegalArgumentException( "No 'from' or 'content' field in copy " + argumentsOnMake); return new EmbeddedResource(content.getBytes("UTF-8"),0); } else { File f = builder.getFile(from); if (f.isFile()) return new FileResource(f); else { try { URL url = new URL(from); return new URLResource(url); } catch(MalformedURLException mfue) { // We ignore this } throw new IllegalArgumentException( "Copy source does not exist " + from + " for destination " + destination); } } }
public Collection<File> getSourcePath() { if (firstUse) { firstUse = false; String sp = getProperty(SOURCEPATH); if (sp != null) { Map<String, Map<String, String>> map = parseHeader(sp); for (Iterator<String> i = map.keySet().iterator(); i.hasNext();) { String file = i.next(); if (!isDuplicate(file)) { File f = getFile(file); if (!f.isDirectory()) { error("Adding a sourcepath that is not a directory: " + f); } else { sourcePath.add(f); } } } } } return sourcePath; }
public Collection<File> getSourcePath() { if (firstUse) { firstUse = false; String sp = getProperty(SOURCEPATH); if (sp != null) { Map<String, Map<String, String>> map = parseHeader(sp); for (Iterator<String> i = map.keySet().iterator(); i.hasNext();) { String file = i.next(); if (!isDuplicate(file)) { File f = getFile(file); if (!f.isDirectory()) { error("Adding a sourcepath that is not a directory: " + f); } else { sourcePath.add(f); } } } } } return sourcePath; }
String destinationPath; sourceFile = getFile(source); if (parts.length == 1) {
for (Iterator<File> i = getSourcePath().iterator(); i.hasNext();) { File root = i.next(); File f = getFile(root, path); if (f.exists()) { found = true; if (!packages.contains(pack)) { packages.add(pack); File bdir = getFile(root, pack); for (int j = 0; j < fixed.length; j++) { File ff = getFile(bdir, fixed[j]); if (ff.isFile()) { String name = "OSGI-OPT/src/" + pack + fixed[j];
File file = getFile(i.next()); if (file.isFile()) { builders.add(getSubBuilder(file));
for (Iterator<File> i = getSourcePath().iterator(); i.hasNext();) { File root = i.next(); File f = getFile(root, path); if (f.exists()) { found = true; if (!packages.contains(pack)) { packages.add(pack); File bdir = getFile(root, pack); for (int j = 0; j < fixed.length; j++) { File ff = getFile(bdir, fixed[j]); if (ff.isFile()) { dot.putResource("OSGI-OPT/src/" + pack
Collection<String> parts = split(cp, ","); for (String part : parts) { File sub = getFile(f.getParentFile(), part); if (!sub.exists() || !sub.getParentFile().equals(f.getParentFile())) { warning("Invalid Class-Path entry %s in %s, must exist and must reside in same directory",
int n = 0; for (String file : map.keySet()) { Jar c = new Jar(getFile(file)); addClose(c); String name = map.get(file).get("name");
int n = 0; for (String file : map.keySet()) { Jar c = new Jar(getFile(file)); addClose(c); String name = map.get(file).get("name");
File f = getFile(key); addWabLib(next, f);
return null; File bndfile = builder.getFile(recipe); if (bndfile.isFile()) {
public void sign(Builder builder, String alias) throws Exception { File f = builder.getFile(keystore); if ( !f.isFile()) { builder.error("Invalid keystore %s", f.getAbsolutePath() );
return null; File bndfile = builder.getFile(recipe); if (bndfile.isFile()) {
File mff = getFile(mf); if (mff.isFile()) { try {
File mff = getFile(mf); if (mff.isFile()) { try {