/** * Ensure that we are running on the correct bnd. */ void doRequireBnd() { Map<String, String> require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND)); if (require == null || require.isEmpty()) return; Hashtable<String, String> map = new Hashtable<String, String>(); map.put(Constants.VERSION_FILTER, getBndVersion()); for (String filter : require.keySet()) { try { Filter f = new Filter(filter); if (f.match(map)) continue; error("%s fails %s", REQUIRE_BND, require.get(filter)); } catch (Exception t) { error("%s with value %s throws exception", t, REQUIRE_BND, require); } } }
System.getProperty("java.version") + " (" + System.getProperty("java.vendor") + ")"); main.putValue(TOOL, "Bnd-" + getBndVersion()); main.putValue(BND_LASTMODIFIED, "" + System.currentTimeMillis());