use of org.eclipse.tycho.core.osgitools.DefaultBundleReader in project tycho by eclipse.
the class TychoMavenLifecycleParticipant method configureComponents.
private void configureComponents(MavenSession session) {
// TODO why does the bundle reader need to cache stuff in the local maven repository?
File localRepository = new File(session.getLocalRepository().getBasedir());
((DefaultBundleReader) bundleReader).setLocationRepository(localRepository);
}
use of org.eclipse.tycho.core.osgitools.DefaultBundleReader in project tycho by eclipse.
the class JarDirectoryBundlesTest method test.
@Test
public void test() throws Exception {
Verifier verifier = getVerifier("MNGECLIPSE949jarDirectoryBundles");
verifier.executeGoal("package");
verifier.verifyErrorFreeLog();
File[] sitePlugins = new File(verifier.getBasedir(), "site/target/site/plugins").listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.isFile() && pathname.getName().startsWith("org.eclipse.platform") && pathname.getName().endsWith(".jar");
}
});
Assert.assertEquals(1, sitePlugins.length);
// verify the bundle actually makes sense
DefaultBundleReader reader = new DefaultBundleReader();
OsgiManifest siteBundleManifest = reader.loadManifest(sitePlugins[0]);
Assert.assertEquals("platform.jar", siteBundleManifest.getBundleClasspath()[0]);
Assert.assertEquals("org.eclipse.platform", siteBundleManifest.getBundleSymbolicName());
File[] productPlugins = new File(verifier.getBasedir(), "product/target/product/eclipse/plugins").listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.isDirectory() && pathname.getName().startsWith("org.eclipse.platform");
}
});
Assert.assertEquals(1, productPlugins.length);
// verify directory actually makes sense
OsgiManifest productBundleManifest = reader.loadManifest(productPlugins[0]);
Assert.assertEquals("platform.jar", productBundleManifest.getBundleClasspath()[0]);
Assert.assertEquals("org.eclipse.platform", productBundleManifest.getBundleSymbolicName());
}
Aggregations