/** * Get the bnddriver, can be null if not set. The overallDriver is the * environment that runs this bnd. */ public String getDriver() { if (driver == null) { driver = getProperty(Constants.BNDDRIVER, null); if (driver != null) driver = driver.trim(); } if (driver != null) return driver; return overallDriver; }
/** * Get the bnddriver, can be null if not set. The overallDriver is the * environment that runs this bnd. */ public String getDriver() { if (driver == null) { driver = getProperty(Constants.BNDDRIVER, null); if (driver != null) driver = driver.trim(); } if (driver != null) return driver; return overallDriver; }
/** * Get the bnddriver, can be null if not set. The overallDriver is the * environment that runs this bnd. */ public String getDriver() { if (driver == null) { driver = getProperty(Constants.BNDDRIVER, null); if (driver != null) driver = driver.trim(); } if (driver != null) return driver; return overallDriver; }
/** * Get the bnddriver, can be null if not set. The overallDriver is the * environment that runs this bnd. */ public String getDriver() { if (driver == null) { driver = getProperty(Constants.BNDDRIVER, null); if (driver != null) driver = driver.trim(); } if (driver != null) return driver; return overallDriver; }
/** * Get the attrs for a gestalt part */ public Parameters getGestalt() { if (gestalt == null) { gestalt = new Parameters(getProperty(Constants.GESTALT)); gestalt.mergeWith(overallGestalt, false); } return gestalt; }
/** * Get the attrs for a gestalt part */ public Parameters getGestalt() { if (gestalt == null) { gestalt = new Parameters(getProperty(Constants.GESTALT)); gestalt.mergeWith(overallGestalt, false); } return gestalt; }
/** * Macro to return the driver. Without any arguments, we return the name of * the driver. If there are arguments, we check each of the arguments * against the name of the driver. If it matches, we return the driver name. * If none of the args match the driver name we return an empty string * (which is false). */ public String _driver(String args[]) { if (args.length == 1) { return getDriver(); } String driver = getDriver(); if (driver == null) driver = getProperty(Constants.BNDDRIVER); if (driver != null) { for (int i = 1; i < args.length; i++) { if (args[i].equalsIgnoreCase(driver)) return driver; } } return ""; }
/** * Macro to return the driver. Without any arguments, we return the name of * the driver. If there are arguments, we check each of the arguments * against the name of the driver. If it matches, we return the driver name. * If none of the args match the driver name we return an empty string * (which is false). */ public String _driver(String args[]) { if (args.length == 1) { return getDriver(); } String driver = getDriver(); if (driver == null) driver = getProperty(Constants.BNDDRIVER); if (driver != null) { for (int i = 1; i < args.length; i++) { if (args[i].equalsIgnoreCase(driver)) return driver; } } return ""; }
/** * Macro to return the driver. Without any arguments, we return the name of * the driver. If there are arguments, we check each of the arguments * against the name of the driver. If it matches, we return the driver name. * If none of the args match the driver name we return an empty string * (which is false). */ public String _driver(String args[]) { if (args.length == 1) { return getDriver(); } String driver = getDriver(); if (driver == null) driver = getProperty(Constants.BNDDRIVER); if (driver != null) { for (int i = 1; i < args.length; i++) { if (args[i].equalsIgnoreCase(driver)) return driver; } } return ""; }
/** * Macro to return the driver. Without any arguments, we return the name of * the driver. If there are arguments, we check each of the arguments * against the name of the driver. If it matches, we return the driver name. * If none of the args match the driver name we return an empty string * (which is false). */ public String _driver(String args[]) { if (args.length == 1) { return getDriver(); } String driver = getDriver(); if (driver == null) driver = getProperty(Constants.BNDDRIVER); if (driver != null) { for (int i = 1; i < args.length; i++) { if (args[i].equalsIgnoreCase(driver)) return driver; } } return ""; }
public Workspace(File dir, String bndDir) throws Exception { super(getDefaults()); dir = dir.getAbsoluteFile(); if (!dir.exists() && !dir.mkdirs()) { throw new IOException("Could not create directory " + dir); } assert dir.isDirectory(); File buildDir = new File(dir, bndDir).getAbsoluteFile(); if (!buildDir.isDirectory()) buildDir = new File(dir, CNFDIR).getAbsoluteFile(); this.buildDir = buildDir; File buildFile = new File(buildDir, BUILDFILE).getAbsoluteFile(); if (!buildFile.isFile()) warning("No Build File in " + dir); setProperties(buildFile, dir); propertiesChanged(); // // There is a nasty bug/feature in Java that gives errors on our // SSL use of github. The flag jsse.enableSNIExtension should be set // to false. So here we provide a way to set system properties // as early as possible // Attrs sysProps = OSGiHeader.parseProperties(getProperty(SYSTEMPROPERTIES)); for (Entry<String,String> e : sysProps.entrySet()) { System.setProperty(e.getKey(), e.getValue()); } }
public Workspace(File dir, String bndDir) throws Exception { super(getDefaults()); dir = dir.getAbsoluteFile(); if (!dir.exists() && !dir.mkdirs()) { throw new IOException("Could not create directory " + dir); } assert dir.isDirectory(); File buildDir = new File(dir, bndDir).getAbsoluteFile(); if (!buildDir.isDirectory()) buildDir = new File(dir, CNFDIR).getAbsoluteFile(); this.buildDir = buildDir; File buildFile = new File(buildDir, BUILDFILE).getAbsoluteFile(); if (!buildFile.isFile()) warning("No Build File in " + dir); setProperties(buildFile, dir); propertiesChanged(); // // There is a nasty bug/feature in Java that gives errors on our // SSL use of github. The flag jsse.enableSNIExtension should be set // to false. So here we provide a way to set system properties // as early as possible // Attrs sysProps = OSGiHeader.parseProperties(getProperty(SYSTEMPROPERTIES)); for (Entry<String,String> e : sysProps.entrySet()) { System.setProperty(e.getKey(), e.getValue()); } }
@Override protected void setTypeSpecificPlugins(Set<Object> list) { try { super.setTypeSpecificPlugins(list); list.add(this); list.add(maven); list.add(settings); if (!isTrue(getProperty(NOBUILDINCACHE))) { list.add(new CachedFileRepo()); } resourceRepositoryImpl = new ResourceRepositoryImpl(); resourceRepositoryImpl.setCache(IO.getFile(getProperty(CACHEDIR, "~/.bnd/caches/shas"))); resourceRepositoryImpl.setExecutor(getExecutor()); resourceRepositoryImpl.setIndexFile(getFile(buildDir, "repo.json")); resourceRepositoryImpl.setURLConnector(new MultiURLConnectionHandler(this)); customize(resourceRepositoryImpl, null); list.add(resourceRepositoryImpl); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
@Override protected void setTypeSpecificPlugins(Set<Object> list) { try { super.setTypeSpecificPlugins(list); list.add(this); list.add(maven); list.add(settings); if (!isTrue(getProperty(NOBUILDINCACHE))) { list.add(new CachedFileRepo()); } resourceRepositoryImpl = new ResourceRepositoryImpl(); resourceRepositoryImpl.setCache(IO.getFile(getProperty(CACHEDIR, "~/.bnd/caches/shas"))); resourceRepositoryImpl.setExecutor(getExecutor()); resourceRepositoryImpl.setIndexFile(getFile(buildDir, "repo.json")); resourceRepositoryImpl.setURLConnector(new MultiURLConnectionHandler(this)); customize(resourceRepositoryImpl, null); list.add(resourceRepositoryImpl); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
Parameters extensions = new Parameters(getProperty(EXTENSION)); Map<DownloadBlocker,Attrs> blockers = new HashMap<DownloadBlocker,Attrs>();
Parameters extensions = new Parameters(getProperty(EXTENSION)); Map<DownloadBlocker,Attrs> blockers = new HashMap<DownloadBlocker,Attrs>();
list.add(settings); if (!isTrue(getProperty(NOBUILDINCACHE))) { CachedFileRepo repo = new CachedFileRepo(); list.add(repo); resourceRepositoryImpl.setCache(IO.getFile(getProperty(CACHEDIR, "~/.bnd/caches/shas"))); resourceRepositoryImpl.setExecutor(getExecutor()); resourceRepositoryImpl.setIndexFile(getFile(getBuildDir(), "repo.json"));
list.add(settings); if (!isTrue(getProperty(NOBUILDINCACHE))) { CachedFileRepo repo = new CachedFileRepo(); list.add(repo); resourceRepositoryImpl.setCache(IO.getFile(getProperty(CACHEDIR, "~/.bnd/caches/shas"))); resourceRepositoryImpl.setExecutor(getExecutor()); resourceRepositoryImpl.setIndexFile(getFile(getBuildDir(), "repo.json"));