[jboss-osgi-commits] JBoss-OSGI SVN: r99284 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers and 12 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Tue Jan 12 09:00:13 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-01-12 09:00:11 -0500 (Tue, 12 Jan 2010)
New Revision: 99284
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragBeanA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragB/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragB/FragBeanB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragC/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragC/FragBeanC.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/HostAActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostB/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostB/HostBActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostC/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostC/HostCActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/subA/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragC.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostC.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragmentService.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/frgmA/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/FragmentHostActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-frgmA.bnd
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleClassLoadingDeployer.java
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostA.bnd
Log:
[JBOSGI-245] Framework fragments
Add more test coverage
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -805,6 +805,7 @@
*/
protected void checkInstalled()
{
+ // If this bundle's state is UNINSTALLED, then an IllegalStateException is thrown
if ((getState() & Bundle.UNINSTALLED) != 0)
throw new IllegalStateException("Bundle " + getCanonicalName() + " is not installed");
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -141,9 +141,14 @@
checkInstalled();
checkAdminPermission(AdminPermission.CLASS);
+ // If this bundle's state is INSTALLED, this method must attempt to resolve this bundle
+ // [TODO] If this bundle cannot be resolved, a Framework event of type FrameworkEvent.ERROR is fired containing a BundleException with details of the reason this bundle could not be resolved.
+ // This method must then throw a ClassNotFoundException.
if (resolveBundle() == false)
+ {
throw new ClassNotFoundException("Cannot load class: " + name);
-
+ }
+
ClassLoader classLoader = getDeploymentUnit().getClassLoader();
Class<?> clazz = classLoader.loadClass(name);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleClassLoadingDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleClassLoadingDeployer.java 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiBundleClassLoadingDeployer.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -29,7 +29,6 @@
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
import org.jboss.classloading.spi.metadata.RequirementsMetaData;
import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.osgi.framework.bundle.AbstractBundleState;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/pom.xml 2010-01-12 14:00:11 UTC (rev 99284)
@@ -58,7 +58,7 @@
<version.jboss.osgi.hotdeploy>1.0.3</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.3-SNAPSHOT</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.2.SP1</version.jboss.osgi.jmx>
+ <version.jboss.osgi.jmx>1.0.3-SNAPSHOT</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.2</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
<version.jboss.osgi.reflect>2.2.0-SNAPSHOT</version.jboss.osgi.reflect>
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2010-01-12 14:00:11 UTC (rev 99284)
@@ -64,7 +64,11 @@
<!-- fragments/simple -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-hostA.jar" files="${tests.resources.dir}/fragments/simple-hostA.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-frgmA.jar" files="${tests.resources.dir}/fragments/simple-frgmA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-hostB.jar" files="${tests.resources.dir}/fragments/simple-hostB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-hostC.jar" files="${tests.resources.dir}/fragments/simple-hostC.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-fragA.jar" files="${tests.resources.dir}/fragments/simple-fragA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-fragB.jar" files="${tests.resources.dir}/fragments/simple-fragB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/fragments-simple-fragC.jar" files="${tests.resources.dir}/fragments/simple-fragC.bnd" />
<!-- jbossas/jbosgi36 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/jbossas/jbosgi36/jbosgi36.bnd" />
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2010-01-12 14:00:11 UTC (rev 99284)
@@ -27,6 +27,7 @@
<include>*:jboss-osgi-webapp:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.felix.configadmin:jar</include>
+ <include>*:org.apache.felix.eventadmin:jar</include>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.apache.felix.metatype:jar</include>
<include>*:pax-web-jetty-bundle:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -31,10 +31,13 @@
import java.net.URL;
import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiPackageAdmin;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.fragments.frgmA.FragmentService;
-import org.junit.Ignore;
+import org.jboss.test.osgi.fragments.fragA.FragBeanA;
+import org.jboss.test.osgi.fragments.subA.SubBeanA;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
@@ -47,104 +50,294 @@
*/
public class FragmentTestCase extends OSGiTest
{
+ private OSGiRuntime runtime;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ runtime = getDefaultRuntime();
+ }
+
+ @After
+ public void tearDown()
+ {
+ if (runtime != null)
+ runtime.shutdown();
+ }
+
@Test
- @Ignore
public void testHostOnly() throws Exception
{
- OSGiRuntime runtime = getDefaultRuntime();
- try
- {
- OSGiBundle host = runtime.installBundle("fragments-simple-hostA.jar");
- assertBundleState(Bundle.INSTALLED, host.getState());
+ // Bundle-SymbolicName: simple-hostA
+ // Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
+ OSGiBundle hostA = runtime.installBundle("fragments-simple-hostA.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
- host.start();
- assertBundleState(Bundle.ACTIVE, host.getState());
+ hostA.start();
+ assertBundleState(Bundle.ACTIVE, hostA.getState());
- URL entryURL = host.getEntry("resources/resource.txt");
- assertNull("Entry URL null", entryURL);
+ URL entryURL = hostA.getEntry("resources/resource.txt");
+ assertNull("Entry URL null", entryURL);
- URL resourceURL = host.getResource("resources/resource.txt");
- assertNull("Resource URL null", resourceURL);
+ URL resourceURL = hostA.getResource("resources/resource.txt");
+ assertNull("Resource URL null", resourceURL);
- host.uninstall();
- assertBundleState(Bundle.UNINSTALLED, host.getState());
- }
- finally
- {
- runtime.shutdown();
- }
+ // Load a private class
+ OSGiBundle subBeanProvider = hostA.loadClass(SubBeanA.class.getName());
+ assertEquals("Class provided by host", hostA, subBeanProvider);
+
+ hostA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostA.getState());
}
@Test
- @Ignore
public void testFragmentOnly() throws Exception
{
- OSGiRuntime runtime = getDefaultRuntime();
+ // Bundle-SymbolicName: simple-fragA
+ // Export-Package: org.jboss.test.osgi.fragments.fragA
+ // Include-Resource: resources/resource.txt=resource.txt
+ // Fragment-Host: simple-hostA
+ OSGiBundle fragA = runtime.installBundle("fragments-simple-fragA.jar");
+ assertBundleState(Bundle.INSTALLED, fragA.getState());
+
+ URL entryURL = fragA.getEntry("resources/resource.txt");
+ assertNotNull("Entry URL not null", entryURL);
+
+ URL resourceURL = fragA.getResource("resources/resource.txt");
+ assertNull("Resource URL null", resourceURL);
+
try
{
- OSGiBundle fragment = runtime.installBundle("fragments-simple-frgmA.jar");
- assertBundleState(Bundle.INSTALLED, fragment.getState());
+ fragA.start();
+ fail("Fragment bundles can not be started");
+ }
+ catch (BundleException e)
+ {
+ assertBundleState(Bundle.INSTALLED, fragA.getState());
+ }
- URL entryURL = fragment.getEntry("resources/resource.txt");
- assertNotNull("Entry URL not null", entryURL);
+ fragA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, fragA.getState());
+ }
- URL resourceURL = fragment.getResource("resources/resource.txt");
- assertNull("Resource URL null", resourceURL);
+ @Test
+ public void testAttachedFragment() throws Exception
+ {
+ // Bundle-SymbolicName: simple-hostA
+ // Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
+ OSGiBundle hostA = runtime.installBundle("fragments-simple-hostA.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
- try
- {
- fragment.start();
- fail("Fragment bundles can not be started");
- }
- catch (BundleException e)
- {
- assertBundleState(Bundle.INSTALLED, fragment.getState());
- }
+ // Bundle-SymbolicName: simple-fragA
+ // Export-Package: org.jboss.test.osgi.fragments.fragA
+ // Include-Resource: resources/resource.txt=resource.txt
+ // Fragment-Host: simple-hostA
+ OSGiBundle fragA = runtime.installBundle("fragments-simple-fragA.jar");
+ assertBundleState(Bundle.INSTALLED, fragA.getState());
- fragment.uninstall();
- assertBundleState(Bundle.UNINSTALLED, fragment.getState());
- }
- finally
+ hostA.start();
+ assertBundleState(Bundle.ACTIVE, hostA.getState());
+ assertBundleState(Bundle.RESOLVED, fragA.getState());
+
+ URL entryURL = hostA.getEntry("resources/resource.txt");
+ assertNull("Entry URL null", entryURL);
+
+ URL resourceURL = hostA.getResource("resources/resource.txt");
+ assertNotNull("Resource URL not null", resourceURL);
+
+ OSGiBundle fragBeanProvider = hostA.loadClass(FragBeanA.class.getName());
+ assertEquals("Class provided by fragment", hostA, fragBeanProvider);
+
+ // Load a private class
+ OSGiBundle subBeanProvider = hostA.loadClass(SubBeanA.class.getName());
+ assertEquals("Class provided by fragment", hostA, subBeanProvider);
+
+ hostA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostA.getState());
+ assertBundleState(Bundle.RESOLVED, fragA.getState());
+
+ fragA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, fragA.getState());
+ }
+
+ @Test
+ public void testHiddenPrivatePackage() throws Exception
+ {
+ if ("jbossmc".equals(getFramework()))
{
- runtime.shutdown();
+ System.out.println("FIXME [JBOSGI-245] Framework fragments");
+ return;
}
+
+ // Bundle-SymbolicName: simple-hostA
+ // Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
+ OSGiBundle hostA = runtime.installBundle("fragments-simple-hostA.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
+
+ // Bundle-SymbolicName: simple-hostB
+ // Export-Package: org.jboss.test.osgi.fragments.subA
+ // Private-Package: org.jboss.test.osgi.fragments.hostB
+ OSGiBundle hostB = runtime.installBundle("fragments-simple-hostB.jar");
+ assertBundleState(Bundle.INSTALLED, hostB.getState());
+
+ // Bundle-SymbolicName: simple-fragB
+ // Import-Package: org.jboss.test.osgi.fragments.subA
+ // Fragment-Host: simple-hostA
+ OSGiBundle fragB = runtime.installBundle("fragments-simple-fragB.jar");
+ assertBundleState(Bundle.INSTALLED, fragB.getState());
+
+ hostA.start();
+ assertBundleState(Bundle.ACTIVE, hostA.getState());
+ assertBundleState(Bundle.RESOLVED, fragB.getState());
+
+ // The fragment contains an overwrites Private-Package with Import-Package
+ // The SubBeanA is expected to come from HostB, which exports that package
+ OSGiBundle subBeanProvider = hostA.loadClass(SubBeanA.class.getName());
+ assertEquals("Class provided by host", hostB, subBeanProvider);
+
+ hostA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostA.getState());
+ assertBundleState(Bundle.RESOLVED, fragB.getState());
+
+ hostB.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostB.getState());
+
+ fragB.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, fragB.getState());
}
@Test
- public void testAttachedFragment() throws Exception
+ public void testFragmentExportsPackage() throws Exception
{
- OSGiRuntime runtime = getDefaultRuntime();
+ if ("jbossmc".equals(getFramework()))
+ {
+ System.out.println("FIXME [JBOSGI-245] Framework fragments");
+ return;
+ }
+
+ // Bundle-SymbolicName: simple-hostA
+ // Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
+ OSGiBundle hostA = runtime.installBundle("fragments-simple-hostA.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
+
+ // Bundle-SymbolicName: simple-hostC
+ // Import-Package: org.jboss.test.osgi.fragments.fragA
+ // Private-Package: org.jboss.test.osgi.fragments.hostC
+ OSGiBundle hostC = runtime.installBundle("fragments-simple-hostC.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
+
+ hostA.start();
+ assertBundleState(Bundle.ACTIVE, hostA.getState());
+
try
{
- OSGiBundle host = runtime.installBundle("fragments-simple-hostA.jar");
- assertBundleState(Bundle.INSTALLED, host.getState());
+ // HostA does not export the package needed by HostC
+ hostC.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ assertBundleState(Bundle.INSTALLED, hostC.getState());
+ }
- OSGiBundle fragment = runtime.installBundle("fragments-simple-frgmA.jar");
- assertBundleState(Bundle.INSTALLED, fragment.getState());
+ // Bundle-SymbolicName: simple-fragA
+ // Export-Package: org.jboss.test.osgi.fragments.fragA
+ // Include-Resource: resources/resource.txt=resource.txt
+ // Fragment-Host: simple-hostA
+ OSGiBundle fragA = runtime.installBundle("fragments-simple-fragA.jar");
+ assertBundleState(Bundle.INSTALLED, fragA.getState());
- host.start();
- assertBundleState(Bundle.ACTIVE, host.getState());
- assertBundleState(Bundle.RESOLVED, fragment.getState());
+ try
+ {
+ // FragA does not attach to the aleady resolved HostA
+ // HostA does not export the package needed by HostC
+ hostC.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ assertBundleState(Bundle.INSTALLED, hostC.getState());
+ }
- URL entryURL = host.getEntry("resources/resource.txt");
- assertNull("Entry URL null", entryURL);
+ // Refreshing HostA causes the FragA to get attached
+ OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+ packageAdmin.refreshPackages(new OSGiBundle[] { hostA });
- URL resourceURL = host.getResource("resources/resource.txt");
- assertNotNull("Resource URL not null", resourceURL);
+ // Wait for the fragment to get attached
+ int timeout = 2000;
+ while (timeout > 0 && fragA.getState() != Bundle.RESOLVED)
+ {
+ Thread.sleep(200);
+ timeout -= 200;
+ }
- OSGiBundle classProvider = host.loadClass(FragmentService.class.getName());
- assertEquals("Class provided by fragment", host, classProvider);
+ // HostC should now resolve and start
+ hostC.start();
+ assertBundleState(Bundle.ACTIVE, hostC.getState());
- host.uninstall();
- assertBundleState(Bundle.UNINSTALLED, host.getState());
- assertBundleState(Bundle.RESOLVED, fragment.getState());
+ hostA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostA.getState());
- fragment.uninstall();
- assertBundleState(Bundle.UNINSTALLED, fragment.getState());
+ hostC.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostC.getState());
+
+ fragA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, fragA.getState());
+ }
+
+ @Test
+ public void testFragmentRequireBundle() throws Exception
+ {
+ if ("jbossmc".equals(getFramework()))
+ {
+ System.out.println("FIXME [JBOSGI-245] Framework fragments");
+ return;
}
- finally
+
+ // Bundle-SymbolicName: simple-hostA
+ // Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
+ OSGiBundle hostA = runtime.installBundle("fragments-simple-hostA.jar");
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
+
+ // Bundle-SymbolicName: simple-fragC
+ // Export-Package: org.jboss.test.osgi.fragments.fragC
+ // Require-Bundle: simple-hostB
+ // Fragment-Host: simple-hostA
+ OSGiBundle fragC = runtime.installBundle("fragments-simple-fragC.jar");
+ assertBundleState(Bundle.INSTALLED, fragC.getState());
+
+ try
{
- runtime.shutdown();
+ // The attached FragA requires bundle HostB, which is not yet installed
+ hostA.start();
+
+ // Clarify error behaviour when fragments fail to attach
+ // https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1524
+ //
+ // Felix: Merges FragC Require-Bundle into HostA and fails to resolve
+ // Equinox: Resolves HostA but does not attach FragA
+ if (hostA.getState() == Bundle.ACTIVE)
+ assertBundleState(Bundle.INSTALLED, fragC.getState());
}
+ catch (BundleException ex)
+ {
+ assertBundleState(Bundle.INSTALLED, hostA.getState());
+ }
+
+ // Bundle-SymbolicName: simple-hostB
+ // Export-Package: org.jboss.test.osgi.fragments.subA
+ // Private-Package: org.jboss.test.osgi.fragments.hostB
+ OSGiBundle hostB = runtime.installBundle("fragments-simple-hostB.jar");
+ assertBundleState(Bundle.INSTALLED, hostB.getState());
+
+ // HostA should resolve and start after HostB got installed
+ hostA.start();
+ assertBundleState(Bundle.ACTIVE, hostA.getState());
+
+ hostA.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, hostA.getState());
+
+ fragC.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, fragC.getState());
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA (from rev 99165, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/frgmA)
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragBeanA.java (from rev 99165, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/frgmA/FragmentService.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragBeanA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragBeanA.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.fragA;
+
+//$Id$
+
+
+public class FragBeanA
+{
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragmentService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/frgmA/FragmentService.java 2010-01-08 15:37:37 UTC (rev 99165)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragA/FragmentService.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.fragments.frgmA;
-
-//$Id$
-
-
-public class FragmentService
-{
-}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragB/FragBeanB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragB/FragBeanB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragB/FragBeanB.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.fragB;
+
+//$Id: FragmentService.java 99106 2010-01-07 11:02:59Z thomas.diesler at jboss.com $
+
+
+public class FragBeanB
+{
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragC/FragBeanC.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragC/FragBeanC.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/fragC/FragBeanC.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.fragC;
+
+//$Id: FragmentService.java 99106 2010-01-07 11:02:59Z thomas.diesler at jboss.com $
+
+
+public class FragBeanC
+{
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/FragmentHostActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/FragmentHostActivator.java 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/FragmentHostActivator.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.fragments.hostA;
-
-//$Id$
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class FragmentHostActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/HostAActivator.java (from rev 99165, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/FragmentHostActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/HostAActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostA/HostAActivator.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.hostA;
+
+//$Id$
+
+import org.jboss.test.osgi.fragments.subA.SubBeanA;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HostAActivator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ SubBeanA subBean = new SubBeanA();
+ subBean.getProvider(context);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostB/HostBActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostB/HostBActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostB/HostBActivator.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.hostB;
+
+//$Id: FragmentHostActivator.java 99106 2010-01-07 11:02:59Z thomas.diesler at jboss.com $
+
+import org.jboss.test.osgi.fragments.subA.SubBeanA;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HostBActivator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ SubBeanA subBean = new SubBeanA();
+ subBean.getProvider(context);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostC/HostCActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostC/HostCActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/hostC/HostCActivator.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.hostC;
+
+//$Id: FragmentHostActivator.java 99106 2010-01-07 11:02:59Z thomas.diesler at jboss.com $
+
+import org.jboss.test.osgi.fragments.fragA.FragBeanA;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HostCActivator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ new FragBeanA();
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.fragments.subA;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+//$Id: SomeBean.java 91513 2009-07-21 19:48:28Z thomas.diesler at jboss.com $
+
+public class SubBeanA
+{
+ public Bundle getProvider(BundleContext context)
+ {
+ ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packageAdmin = (PackageAdmin)context.getService(sref);
+ Bundle provider = packageAdmin.getBundle(getClass());
+ return provider;
+ }
+
+}
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-12 14:00:11 UTC (rev 99284)
@@ -106,6 +106,9 @@
<bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
+ <bean name="MessageBoardService" class="org.jboss.osgi.framework.service.internal.MessageBoardServiceImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
<!--
********************************
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragA.bnd (from rev 99165, projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-frgmA.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragA.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragA.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,9 @@
+# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-fragA.jar src/test/resources/fragments/simple-fragA.bnd
+
+Bundle-SymbolicName: simple-fragA
+Export-Package: org.jboss.test.osgi.fragments.fragA
+Include-Resource: resources/resource.txt=resource.txt
+Fragment-Host: simple-hostA
+
+-removeheaders: Include-Resource
+
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragB.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragB.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-fragB.jar src/test/resources/fragments/simple-fragB.bnd
+
+Bundle-SymbolicName: simple-fragB
+Export-Package: org.jboss.test.osgi.fragments.fragB
+Import-Package: org.jboss.test.osgi.fragments.subA
+Fragment-Host: simple-hostA
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragC.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragC.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-fragC.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-fragC.jar src/test/resources/fragments/simple-fragC.bnd
+
+Bundle-SymbolicName: simple-fragC
+Export-Package: org.jboss.test.osgi.fragments.fragC
+Require-Bundle: simple-hostB
+Fragment-Host: simple-hostA
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-frgmA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-frgmA.bnd 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-frgmA.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -1,9 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-frgmA.jar src/test/resources/fragments/simple-frgmA.bnd
-
-Bundle-SymbolicName: simple-frgmA
-Fragment-Host: simple-hostA
-Export-Package: org.jboss.test.osgi.fragments.frgmA
-Include-Resource: resources/resource.txt=resource.txt
-
--removeheaders: Include-Resource
-
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostA.bnd 2010-01-12 13:57:21 UTC (rev 99283)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostA.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-hostA.jar src/test/resources/fragments/simple-hostA.bnd
Bundle-SymbolicName: simple-hostA
-Bundle-Activator: org.jboss.test.osgi.fragments.hostA.FragmentHostActivator
-Private-Package: org.jboss.test.osgi.fragments.hostA
+Bundle-Activator: org.jboss.test.osgi.fragments.hostA.HostAActivator
+Private-Package: org.jboss.test.osgi.fragments.hostA, org.jboss.test.osgi.fragments.subA
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostB.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostB.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,7 @@
+# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-hostB.jar src/test/resources/fragments/simple-hostB.bnd
+
+Bundle-SymbolicName: simple-hostB
+Bundle-Activator: org.jboss.test.osgi.fragments.hostB.HostBActivator
+Export-Package: org.jboss.test.osgi.fragments.subA
+Private-Package: org.jboss.test.osgi.fragments.hostB
+
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostC.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostC.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/fragments/simple-hostC.bnd 2010-01-12 14:00:11 UTC (rev 99284)
@@ -0,0 +1,7 @@
+# bnd build -classpath target/test-classes -output target/test-libs/fragments-simple-hostC.jar src/test/resources/fragments/simple-hostC.bnd
+
+Bundle-SymbolicName: simple-hostC
+Bundle-Activator: org.jboss.test.osgi.fragments.hostC.HostCActivator
+Private-Package: org.jboss.test.osgi.fragments.hostC
+Import-Package: org.osgi.framework, org.jboss.test.osgi.fragments.fragA
+
More information about the jboss-osgi-commits
mailing list