return m_version;
}
}
protected static File createBundle(String bsn, Version version, String... headers) throws Exception {
Builder b = new Builder();
try {
b.setProperty("Bundle-SymbolicName", bsn);
b.setProperty("Bundle-Version", version.toString());
for (int i = 0; i < headers.length; i += 2) {
b.setProperty(headers[i], headers[i + 1]);
}
b.setProperty("Include-Resource", "bnd.bnd"); // prevent empty jar bug
Jar jar = b.build();
jar.getManifest(); // Not sure whether this is needed...
File file = File.createTempFile("testbundle", ".jar");
file.deleteOnExit();
jar.write(file);
return file;
}
finally {
b.close();
}
}