* are created in the paxweb temp directory, and not in the svn tree
*/
@Before
public static void createApplications() throws Exception
{
ZipFixture bundle = ArchiveFixture.newJar().manifest()
.attribute(Constants.BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_VALUE)
.attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
.attribute(Constants.IMPORT_PACKAGE, "p.q.r, x.y.z, javax.naming, " + BUNDLE_IN_FRAMEWORK)
.attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
FileOutputStream fout = new FileOutputStream(CORE_BUNDLE_BY_VALUE + ".jar");
bundle.writeOut(fout);
fout.close();
bundle = ArchiveFixture.newJar().manifest()
.attribute(Constants.BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_VALUE)
.attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
.attribute(Constants.EXPORT_PACKAGE, "p.q.r")
.attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar");
bundle.writeOut(fout);
fout.close();
bundle = ArchiveFixture.newJar().manifest()
.attribute(Constants.BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_REFERENCE)
.attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
.attribute(Constants.EXPORT_PACKAGE, "x.y.z")
.attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar");
bundle.writeOut(fout);
fout.close();
bundle = ArchiveFixture.newJar().manifest()
.attribute(Constants.BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
.attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
.attribute(Constants.EXPORT_PACKAGE, "d.e.f")
.attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + ".jar");
bundle.writeOut(fout);
fout.close();
bundle = ArchiveFixture.newJar().manifest()
.attribute(Constants.BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
.attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
.attribute(Constants.EXPORT_PACKAGE, "d.e.f").end();
fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
bundle.writeOut(fout);
fout.close();
ZipFixture testEba = ArchiveFixture.newZip()
.binary("META-INF/APPLICATION.MF",
OBRResolverTest.class.getClassLoader().getResourceAsStream("obr/APPLICATION.MF"))
.end()
.binary(CORE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(CORE_BUNDLE_BY_VALUE + ".jar")).end()
.binary(TRANSITIVE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar")).end();
fout = new FileOutputStream("blog.eba");
testEba.writeOut(fout);
fout.close();
}