Author: thomas.diesler(a)jboss.com
Date: 2010-03-19 21:03:36 -0400 (Fri, 19 Mar 2010)
New Revision: 102655
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/META-INF/MANIFEST.MF
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/core/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Use explicit manifest.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml 2010-03-20
01:00:12 UTC (rev 102654)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml 2010-03-20
01:03:36 UTC (rev 102655)
@@ -24,7 +24,7 @@
<name>JBossOSGi Framework - Bundle</name>
<groupId>org.jboss.osgi.framework</groupId>
<artifactId>jboss-osgi-framework</artifactId>
- <packaging>bundle</packaging>
+ <packaging>jar</packaging>
<parent>
<groupId>org.jboss.osgi.framework</groupId>
@@ -42,6 +42,10 @@
<artifactId>jboss-osgi-framework-core</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ </dependency>
<!-- Test bundles dependencies -->
<dependency>
@@ -180,6 +184,12 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -236,32 +246,14 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-idea-plugin</artifactId>
+ <artifactId>maven-jar-plugin</artifactId>
<configuration>
- <downloadSources>true</downloadSources>
+ <archive>
+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
-
<Bundle-SymbolicName>org.jboss.osgi.framework</Bundle-SymbolicName>
- <Bundle-Name>JBossOSGi Framework</Bundle-Name>
- <Bundle-Version>${version}</Bundle-Version>
- <Export-Package>
- org.osgi.framework;version="1.5",
- org.osgi.framework.launch;version="1.0",
- org.osgi.framework.hooks.service;version="1.0",
- org.osgi.service.packageadmin;version="1.2",
- org.osgi.service.startlevel;version="1.1",
- org.osgi.util.tracker;version="1.4"
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx512m</argLine>
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml 2010-03-20
01:00:12 UTC (rev 102654)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml 2010-03-20
01:03:36 UTC (rev 102655)
@@ -36,8 +36,12 @@
<include>*:jboss-mdr:jar</include>
<include>*:jboss-metatype:jar</include>
<include>*:jboss-osgi-deployment:jar</include>
+ <include>*:jboss-osgi-framework-core:jar</include>
+ <include>*:jboss-osgi-framework-metadata:jar</include>
<include>*:jboss-osgi-spi:jar</include>
+ <include>*:jboss-osgi-vfs:jar</include>
<include>*:jboss-reflect:jar</include>
+ <include>*:jboss-vfs:jar</include>
<include>*:jbossxb:jar</include>
<include>*:mcann-core:jar</include>
<include>*:org.osgi.core:jar</include>
@@ -52,12 +56,71 @@
<includes>
<include>*:jboss-logging-log4j:jar</include>
<include>*:jboss-osgi-deployers-vfs30:jar</include>
- <include>*:jboss-vfs:jar</include>
+ <include>*:jboss-osgi-framework-vfs30:jar</include>
+ <include>*:jboss-osgi-vfs30:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
<scope>test</scope>
<unpack>true</unpack>
</dependencySet>
+
+ <!-- dependencySet>
+ <outputDirectory>lib</outputDirectory>
+
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ <includes>
+ <include>*:args4j:jar</include>
+ <include>*:javax.inject:jar</include>
+ <include>*:jaxb-api:jar</include>
+ <include>*:jboss-classloader:jar</include>
+ <include>*:jboss-classloading:jar</include>
+ <include>*:jboss-classloading-spi:jar</include>
+ <include>*:jboss-classloading-vfs:jar</include>
+ <include>*:jboss-common-core:jar</include>
+ <include>*:jboss-dependency:jar</include>
+ <include>*:jboss-deployers-client:jar</include>
+ <include>*:jboss-deployers-client-spi:jar</include>
+ <include>*:jboss-deployers-core:jar</include>
+ <include>*:jboss-deployers-core-spi:jar</include>
+ <include>*:jboss-deployers-impl:jar</include>
+ <include>*:jboss-deployers-spi:jar</include>
+ <include>*:jboss-deployers-structure-spi:jar</include>
+ <include>*:jboss-deployers-vfs:jar</include>
+ <include>*:jboss-deployers-vfs-spi:jar</include>
+ <include>*:jboss-kernel:jar</include>
+ <include>*:jboss-logging-spi:jar</include>
+ <include>*:jboss-managed:jar</include>
+ <include>*:jboss-mdr:jar</include>
+ <include>*:jboss-metatype:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
+ <include>*:jboss-osgi-framework-core:jar</include>
+ <include>*:jboss-osgi-framework-metadata:jar</include>
+ <include>*:jboss-osgi-spi:jar</include>
+ <include>*:jboss-osgi-vfs:jar</include>
+ <include>*:jboss-reflect:jar</include>
+ <include>*:jboss-vfs:jar</include>
+ <include>*:jbossxb:jar</include>
+ <include>*:mcann-core:jar</include>
+ <include>*:org.osgi.core:jar</include>
+ <include>*:org.osgi.compendium:jar</include>
+ </includes>
+ <useStrictFiltering>true</useStrictFiltering>
+ <scope>compile</scope>
+ <unpack>false</unpack>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ <includes>
+ <include>*:jboss-logging-log4j:jar</include>
+ <include>*:jboss-osgi-deployers-vfs30:jar</include>
+ <include>*:jboss-osgi-framework-vfs30:jar</include>
+ <include>*:jboss-osgi-vfs30:jar</include>
+ </includes>
+ <useStrictFiltering>true</useStrictFiltering>
+ <scope>test</scope>
+ <unpack>false</unpack>
+ </dependencySet-->
+
</dependencySets>
<fileSets>
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-03-20
01:00:12 UTC (rev 102654)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-03-20
01:03:36 UTC (rev 102655)
@@ -89,7 +89,7 @@
<bean name="StartLevelService"
class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
</bean>
- <bean name="PackageAdminService"
class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <bean name="PackageAdminService"
class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
</bean>
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/META-INF/MANIFEST.MF
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/META-INF/MANIFEST.MF
(rev 0)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/main/resources/META-INF/MANIFEST.MF 2010-03-20
01:03:36 UTC (rev 102655)
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-Name: JBossOSGi Framework
+Bundle-ManifestVersion: 2
+Bundle-License:
http://repository.jboss.com/licenses/lgpl.txt
+Bundle-Description: JBossOSGi Native Framework
+Bundle-SymbolicName: org.jboss.osgi.framework
+Bundle-Version: ${version}
+Export-Package:
org.osgi.framework;version="1.5",org.osgi.framework.launch;version="1.0",org.osgi.framework.hooks.service;version="1.0",org.osgi.service.packageadmin;version="1.2",org.osgi.service.startlevel;version="1.1",org.osgi.util.tracker;version="1.4"
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java 2010-03-20
01:00:12 UTC (rev 102654)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java 2010-03-20
01:03:36 UTC (rev 102655)
@@ -25,8 +25,17 @@
import static org.junit.Assert.assertEquals;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Map;
+
+import org.jboss.osgi.framework.launch.OSGiFrameworkFactory;
import org.jboss.osgi.spi.util.ConstantsHelper;
import org.jboss.osgi.spi.util.ServiceLoader;
+import org.junit.Ignore;
import org.junit.Test;
import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
@@ -38,28 +47,58 @@
* @author thomas.diesler(a)jboss.com
* @since 27-Jul-2009
*/
-public class FrameworkLaunchTestCase
+public class FrameworkLaunchTestCase
{
@Test
public void testFrameworkLaunch() throws BundleException
{
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
Framework framework = factory.newFramework(null);
-
+
assertEquals("BundleId == 0", 0, framework.getBundleId());
assertEquals("SymbolicName", "system.bundle",
framework.getSymbolicName());
-
+
String state = ConstantsHelper.bundleState(framework.getState());
assertEquals("INSTALLED", state);
-
+
framework.init();
-
+
state = ConstantsHelper.bundleState(framework.getState());
assertEquals("STARTING", state);
-
+
framework.start();
-
+
state = ConstantsHelper.bundleState(framework.getState());
assertEquals("ACTIVE", state);
}
+
+ @Ignore
+ public void testFrameworkAllLaunch() throws Exception
+ {
+ // Get the aggregated framework jar
+ File[] files = new File("./target").listFiles(new FilenameFilter()
+ {
+ public boolean accept(File dir, String name)
+ {
+ return name.startsWith("jboss-osgi-framework-") &&
name.endsWith("-all.jar");
+ }
+ });
+ assertEquals(1, files.length);
+
+ // Use a classloader that only contains the aggregated framework jar
+ URL frameworkAllURL = files[0].toURI().toURL();
+ URLClassLoader loader = new URLClassLoader(new URL[] { frameworkAllURL }, null);
+
+ // Load the FrameworkFactory
+ Class<?> factoryClass =
loader.loadClass(OSGiFrameworkFactory.class.getName());
+ Object frameworkFactory = factoryClass.newInstance();
+
+ // Construct the Framework
+ Method method = factoryClass.getMethod("newFramework", Map.class);
+ Object framework = method.invoke(frameworkFactory, new Object[] { null });
+
+ // Start the Framework
+ method = framework.getClass().getMethod("start", new Class[] {});
+ method.invoke(framework, new Object[] {});
+ }
}
\ No newline at end of file
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-03-20
01:00:12 UTC (rev 102654)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-03-20
01:03:36 UTC (rev 102655)
@@ -59,11 +59,6 @@
<parameter><inject bean="OSGiDeploymentRegistry"
/></parameter>
</constructor>
</bean>
- <!--
- <bean name="OSGiBundleResolver"
class="org.jboss.osgi.framework.resolver.internal.basic.BasicResolverImpl">
- <constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
- </bean>
- -->
<bean name="OSGiFrameworkEventsPlugin"
class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
</bean>
@@ -97,9 +92,6 @@
<bean name="PackageAdminService"
class="org.jboss.osgi.framework.packageadmin.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
</bean>
- <bean name="DeployerService"
class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
- <constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
- </bean>
<bean name="LifecycleInterceptorService"
class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager"
/></parameter></constructor>
</bean>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/core/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/core/pom.xml 2010-03-20 01:00:12
UTC (rev 102654)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/core/pom.xml 2010-03-20 01:03:36
UTC (rev 102655)
@@ -48,7 +48,7 @@
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
</dependency>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-03-20 01:00:12 UTC
(rev 102654)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-03-20 01:03:36 UTC
(rev 102655)
@@ -50,6 +50,7 @@
<version.jboss.deployers>2.2.0.Alpha4</version.jboss.deployers>
<version.jboss.kernel>2.2.0.Alpha9</version.jboss.kernel>
<version.jboss.logging>2.2.0.CR1</version.jboss.logging>
+ <version.jboss.vfs>3.0.0.CR5</version.jboss.vfs>
<version.jboss.mdr>2.2.0.Alpha2</version.jboss.mdr>
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
@@ -126,6 +127,11 @@
<artifactId>jboss-mdr</artifactId>
<version>${version.jboss.mdr}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ <version>${version.jboss.vfs}</version>
+ </dependency>
<!-- JBoss OSGi Dependencies -->
<dependency>
@@ -144,7 +150,7 @@
<version>${version.jboss.osgi.deployers}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2010-03-20 01:00:12 UTC (rev 102654)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2010-03-20 01:03:36 UTC (rev 102655)
@@ -370,30 +370,28 @@
<version>${version.jboss.osgi.xml.binding}</version>
<classifier>javadoc</classifier>
</dependency>
-
- <!-- jboss.osgi.runtime -->
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
<classifier>javadoc</classifier>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.jbossas</groupId>
<artifactId>jboss-osgi-jbossas</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.jbossas</groupId>
<artifactId>jboss-osgi-jbossas</artifactId>
<version>${version.jboss.osgi.jbossas}</version>
<classifier>sources</classifier>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2010-03-20 01:00:12 UTC (rev 102654)
+++ projects/jboss-osgi/trunk/pom.xml 2010-03-20 01:03:36 UTC (rev 102655)
@@ -221,15 +221,13 @@
<artifactId>jboss-osgi-xml-binding</artifactId>
<version>${version.jboss.osgi.xml.binding}</version>
</dependency>
-
- <!-- jboss.osgi.runtime -->
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.jbossas</groupId>
<artifactId>jboss-osgi-jbossas</artifactId>
<version>${version.jboss.osgi.jbossas}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2010-03-20 01:00:12 UTC (rev 102654)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2010-03-20 01:03:36 UTC (rev 102655)
@@ -49,7 +49,7 @@
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.deployment</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
</dependency>