JBoss-OSGI SVN: r87966 - in projects/jboss-osgi/trunk: build/distribution and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 19:11:46 -0400 (Tue, 28 Apr 2009)
New Revision: 87966
Added:
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/BundleTestCase.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/basic-felix-framework.properties
Modified:
projects/jboss-osgi/trunk/build/distribution/pom.xml
projects/jboss-osgi/trunk/bundle/blueprint/pom.xml
projects/jboss-osgi/trunk/bundle/blueprint/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/jboss-osgi-framework.properties
projects/jboss-osgi/trunk/bundle/common/pom.xml
projects/jboss-osgi/trunk/bundle/deployment/pom.xml
projects/jboss-osgi/trunk/bundle/jmx/pom.xml
projects/jboss-osgi/trunk/bundle/logging/pom.xml
projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml
projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
projects/jboss-osgi/trunk/bundle/webconsole/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
Log:
WIP
Modified: projects/jboss-osgi/trunk/build/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -34,23 +34,23 @@
<!-- Dependencies -->
<dependencies>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
@@ -96,12 +96,12 @@
<type>jdocbook</type>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webconsole</artifactId>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webconsole</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
Modified: projects/jboss-osgi/trunk/bundle/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/blueprint/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -2,6 +2,8 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi - Bundle Blueprint Service</name>
+
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-blueprint</artifactId>
<packaging>jar</packaging>
@@ -33,31 +35,49 @@
<artifactId>org.apache.felix.log</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- Bundle Dependencies -->
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-jmx</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>apache-xerces-bundle</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-common-core-bundle</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jbossxb-bundle</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
Modified: projects/jboss-osgi/trunk/bundle/blueprint/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/scripts/assembly-bundles.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/blueprint/scripts/assembly-bundles.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -15,12 +15,15 @@
<outputDirectory>bundles</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<includes>
+ <include>*:apache-xerces-bundle:jar</include>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
+ <include>*:jboss-common-core-bundle:jar</include>
+ <include>*:jbossxb-bundle:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
<scope>provided</scope>
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/BundleTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/BundleTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/BundleTestCase.java 2009-04-28 23:11:46 UTC (rev 87966)
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+
+
+//$Id$
+package org.jboss.test.osgi.blueprint.bootstrap;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * Test OSGi System bundle access
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class BundleTestCase extends OSGiTest
+{
+ public void testApacheXercesBundle() throws BundleException
+ {
+ OSGiBootstrapProvider configProvider = OSGiBootstrap.getBootstrapProvider();
+ configProvider.configure("basic-felix-framework.properties");
+
+ OSGiFramework framework = configProvider.getFramework();
+ try
+ {
+ BundleContext context = framework.getSystemBundleContext();
+
+ Bundle bundle = installBundle(context, "bundles/apache-xerces-bundle.jar", true);
+
+ assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+ }
+ finally
+ {
+ framework.stop();
+ }
+ }
+
+ public void testJBossCommonCoreBundle() throws BundleException
+ {
+ OSGiBootstrapProvider configProvider = OSGiBootstrap.getBootstrapProvider();
+ configProvider.configure("basic-felix-framework.properties");
+
+ OSGiFramework framework = configProvider.getFramework();
+ try
+ {
+ BundleContext context = framework.getSystemBundleContext();
+
+ Bundle bundle = installBundle(context, "bundles/apache-xerces-bundle.jar", true);
+ bundle = installBundle(context, "bundles/jboss-common-core-bundle.jar", true);
+
+ assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+ }
+ finally
+ {
+ framework.stop();
+ }
+ }
+
+ public void testJBossXBBundle() throws BundleException
+ {
+ OSGiBootstrapProvider configProvider = OSGiBootstrap.getBootstrapProvider();
+ configProvider.configure("basic-felix-framework.properties");
+
+ OSGiFramework framework = configProvider.getFramework();
+ try
+ {
+ BundleContext context = framework.getSystemBundleContext();
+
+ Bundle bundle = installBundle(context, "bundles/apache-xerces-bundle.jar", true);
+ bundle = installBundle(context, "bundles/jboss-common-core-bundle.jar", true);
+ bundle = installBundle(context, "bundles/jbossxb-bundle.jar", true);
+
+ assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+ }
+ finally
+ {
+ framework.stop();
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/BundleTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/basic-felix-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/basic-felix-framework.properties (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/basic-felix-framework.properties 2009-04-28 23:11:46 UTC (rev 87966)
@@ -0,0 +1,38 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id: $
+#
+
+# The OSGiFramework implementation
+framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
+
+# Properties to configure the Framework
+# All props start with 'framework.prop'
+framework.prop.org.osgi.framework.storage.clean=onFirstInit
+framework.prop.org.osgi.framework.system.packages=\
+ javax.activation, \
+ javax.management, \
+ javax.naming, \
+ javax.naming.spi, \
+ javax.net, \
+ javax.net.ssl, \
+ javax.xml.bind.annotation, \
+ javax.xml.bind.annotation.adapters, \
+ javax.xml.namespace, \
+ javax.xml.parsers, \
+ javax.xml.transform, \
+ javax.xml.transform.sax, \
+ org.jboss.logging, \
+ org.osgi.framework; version=1.4
+
+# Bundles that need to be installed with the Framework automatically
+framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+
+# Bundles that need to be started automatically
+framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
+ file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
+
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/jboss-osgi-framework.properties 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/jboss-osgi-framework.properties 2009-04-28 23:11:46 UTC (rev 87966)
@@ -12,6 +12,8 @@
framework.prop.org.osgi.framework.storage.clean=onFirstInit
framework.prop.org.osgi.framework.system.packages=\
javax.management, \
+ javax.naming, \
+ javax.naming.spi, \
javax.xml.namespace, \
javax.xml.parsers, \
org.jboss.logging, \
@@ -26,8 +28,11 @@
# Bundles that need to be started automatically
framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
+ file://${test.archive.directory}/bundles/apache-xerces-bundle.jar \
+ file://${test.archive.directory}/bundles/jboss-common-core-bundle.jar \
+ file://${test.archive.directory}/bundles/jbossxb-bundle.jar \
file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
file://${test.archive.directory}/bundles/jboss-osgi-logging.jar \
file://${test.archive.directory}/bundles/jboss-osgi-microcontainer.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-jmx.jar
+ file://${test.archive.directory}/bundles/jboss-osgi-jmx.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundle/common/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/common/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/common/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -2,6 +2,8 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi - Bundle Common</name>
+
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<packaging>bundle</packaging>
Modified: projects/jboss-osgi/trunk/bundle/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/deployment/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -4,7 +4,7 @@
<name>JBossOSGi - Bundle Deployment</name>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<packaging>bundle</packaging>
Modified: projects/jboss-osgi/trunk/bundle/jmx/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/jmx/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/jmx/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -2,6 +2,8 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi - Bundle JMX</name>
+
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-jmx</artifactId>
<packaging>bundle</packaging>
@@ -19,14 +21,16 @@
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-common</artifactId>
+ <artifactId>jboss-osgi-spi</artifactId>
<version>${version}</version>
</dependency>
+
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
<version>${version}</version>
</dependency>
+
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
Modified: projects/jboss-osgi/trunk/bundle/logging/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/logging/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/logging/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -4,7 +4,7 @@
<name>JBossOSGi - Bundle Logging</name>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<packaging>bundle</packaging>
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -4,7 +4,7 @@
<name>JBossOSGi - Bundle Microcontainer</name>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<packaging>bundle</packaging>
@@ -22,17 +22,12 @@
<artifactId>jboss-osgi-spi</artifactId>
<version>${version}</version>
</dependency>
+
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-common</artifactId>
- <version>${version}</version>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-jmx</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-client-spi</artifactId>
</dependency>
@@ -40,11 +35,27 @@
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-vfs</artifactId>
</dependency>
+
+ <!-- Bundle Dependencies -->
<dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <version>${version}</version>
</dependency>
-
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jmx</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>apache-xerces-bundle</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jbossxb-bundle</artifactId>
+ </dependency>
+
<!-- Provided Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
@@ -75,58 +86,43 @@
org.jboss.osgi.microcontainer.internal
</Private-Package>
<Import-Package>
- com.wutka.dtd*;resolution:=optional,
- com.sun.jdi*;resolution:=optional,
- javassist*;resolution:=optional,
- javax.activation;resolution:=optional,
- javax.naming*;resolution:=optional,
- javax.net*;resolution:=optional,
+ <!-- system -->
javax.management,
- javax.xml.*;resolution:=optional,
- org.apache.commons.httpclient;resolution:=optional,
- org.apache.webdav.lib;resolution:=optional,
- org.apache.xerces*,
- org.apache.xml.resolver*;resolution:=optional,
- org.jboss.annotation.*;resolution:=optional,
- org.jboss.beans.*;resolution:=optional,
- org.jboss.classadapter.spi;resolution:=optional,
- org.jboss.classloader.*;resolution:=optional,
- org.jboss.classloading.*;resolution:=optional,
- org.jboss.config.*,
- org.jboss.dependency.*;resolution:=optional,
- org.jboss.deployers.*;resolution:=optional,
- org.jboss.joinpoint.*;resolution:=optional,
- org.jboss.logging,
- org.jboss.managed.*;resolution:=optional,
- org.jboss.metadata.*;resolution:=optional,
- org.jboss.metatype.*;resolution:=optional,
- org.jboss.osgi.common.log,
- org.jboss.osgi.jmx,
- org.jboss.reflect.*;resolution:=optional,
- org.jboss.test;resolution:=optional,
- org.jboss.util*;resolution:=optional,
- org.jboss.virtual*;resolution:=optional,
- org.jboss.xb.*,
- org.osgi.framework;version=1.4,
- org.osgi.service.log,
+ javax.naming*,
+ javax.xml.bind.*,
+ javax.xml.namespace,
+ javax.xml.parsers,
+ org.w3c.dom,
+
+ <!-- osgi -->
+ org.osgi.framework,
+ org.osgi.service.log,
org.osgi.util.tracker,
- org.w3c.dom*,
- org.xml.sax*,
- sun.io;resolution:=optional
+
+ <!-- import -->
+ org.jboss.osgi.common.log,
+ org.jboss.osgi.jmx,
+ org.jboss.util.*,
+ org.jboss.xb.*,
+
+ <!-- optional -->
+ org.apache.commons.httpclient;resolution=optional,
+ org.apache.webdav.lib;resolution=optional,
+
+ <!-- exclude -->
+ !com.sun.jdi*,
+ !org.jboss.test.*
</Import-Package>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>
- jboss-common-core,
- jboss-dependency,
- jboss-deployers-client-spi,
- jboss-deployers-vfs,
- jboss-mdr,
- jboss-kernel,
- jboss-reflect,
- jboss-vfs,
- jbossxb,
- xml-apis,
- xercesImpl,
+ javassist;scope=test;inline=false,
+ jboss-dependency;inline=false,
+ jboss-logging-spi;inline=false,
+ jboss-managed;inline=false,
+ jboss-metatype;inline=false,
+ jboss-mdr;inline=false,
+ jboss-kernel;inline=false,
+ jboss-reflect;inline=false,
</Embed-Dependency>
</instructions>
</configuration>
Modified: projects/jboss-osgi/trunk/bundle/remotelog/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/remotelog/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/remotelog/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -4,7 +4,7 @@
<name>JBossOSGi - Bundle Remote Logging</name>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-remotelog</artifactId>
<packaging>bundle</packaging>
Modified: projects/jboss-osgi/trunk/bundle/webconsole/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/webconsole/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/bundle/webconsole/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -3,7 +3,7 @@
<name>JBossOSGi - Bundle WebConsole</name>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webconsole</artifactId>
<packaging>bundle</packaging>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -19,7 +19,8 @@
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi
+ </developerConnection>
<url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
</scm>
@@ -34,7 +35,8 @@
<!-- Properties -->
<properties>
- <version.aqute.bnd>0.0.315</version.aqute.bnd>
+ <version.apache.xerces.bundle>2.9.1-SNAPSHOT</version.apache.xerces.bundle>
+ <version.aqute.bnd>0.0.323</version.aqute.bnd>
<version.equinox>3.4.2</version.equinox>
<version.felix.configadmin>1.0.10</version.felix.configadmin>
<version.felix.framework>1.6.0</version.felix.framework>
@@ -48,7 +50,7 @@
<version.javax.servlet>2.4</version.javax.servlet>
<version.jbossas>5.0.1.GA</version.jbossas>
<version.jboss.aop>2.0.1.GA</version.jboss.aop>
- <version.jboss.common.core>2.2.11.GA</version.jboss.common.core>
+ <version.jboss.common.core>2.2.11-SNAPSHOT</version.jboss.common.core>
<version.jboss.deployers>2.0.5.GA</version.jboss.deployers>
<version.jboss.jacc>1.1.0.GA</version.jboss.jacc>
<version.jboss.jdocbook.plugin>2.1.2</version.jboss.jdocbook.plugin>
@@ -58,6 +60,7 @@
<version.jboss.metadata>1.0.0.CR11</version.jboss.metadata>
<version.jboss.microcontainer>2.0.4.GA</version.jboss.microcontainer>
<version.jboss.test>1.0.5.GA</version.jboss.test>
+ <version.jbossxb.bundle>2.0.0-SNAPSHOT</version.jbossxb.bundle>
<version.junit>4.4</version.junit>
<version.knopflerfish>2.2.0</version.knopflerfish>
<version.log4j>1.2.14</version.log4j>
@@ -93,11 +96,6 @@
<version>${version.izpack}</version>
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <version>${version.jboss.common.core}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.aop</groupId>
<artifactId>jboss-aop</artifactId>
<version>${version.jboss.aop}</version>
@@ -173,7 +171,26 @@
<artifactId>jboss-aop-mc-int</artifactId>
<version>${version.jboss.microcontainer}</version>
</dependency>
+
+ <!-- Bundle Dependencies -->
<dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>apache-xerces-bundle</artifactId>
+ <version>${version.apache.xerces.bundle}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-common-core-bundle</artifactId>
+ <version>${version.jboss.common.core}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jbossxb-bundle</artifactId>
+ <version>${version.jbossxb.bundle}</version>
+ </dependency>
+
+ <!-- OSGi Dependencies -->
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>${version.osgi}</version>
@@ -266,7 +283,7 @@
</dependencies>
</dependencyManagement>
- <!-- Dependencies -->
+ <!-- Dependencies -->
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -324,10 +341,16 @@
<pluginManagement>
<plugins>
<plugin>
- <artifactId>maven-idea-plugin</artifactId>
- <configuration>
- <downloadSources>true</downloadSources>
- </configuration>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>biz.aQute</groupId>
+ <artifactId>bnd</artifactId>
+ <version>${version.aqute.bnd}</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</pluginManagement>
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-04-28 23:11:46 UTC (rev 87966)
@@ -117,6 +117,8 @@
// Init the the autoStart URLs
List<URL> startURLs = getBundleURLs(props, "framework.autoStart");
framework.setAutoStart(startURLs);
+
+ configured = true;
}
private List<URL> getBundleURLs(Properties props, String key)
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -55,19 +55,19 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-remotelog</artifactId>
<version>${version}</version>
<scope>provided</scope>
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-04-28 23:11:46 UTC (rev 87966)
@@ -55,19 +55,19 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-logging</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-remotelog</artifactId>
<version>${version}</version>
<scope>provided</scope>
16 years, 8 months
JBoss-OSGI SVN: r87965 - in projects/jboss-osgi/bundles: apache-xerces and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 19:10:47 -0400 (Tue, 28 Apr 2009)
New Revision: 87965
Added:
projects/jboss-osgi/bundles/jboss-common-core/
projects/jboss-osgi/bundles/jboss-common-core/pom.xml
Removed:
projects/jboss-osgi/bundles/apache-xerces/.project
projects/jboss-osgi/bundles/jbossxb/.project
Modified:
projects/jboss-osgi/bundles/apache-xerces/pom.xml
projects/jboss-osgi/bundles/jbossxb/pom.xml
projects/jboss-osgi/bundles/pom.xml
Log:
Add common-core
Deleted: projects/jboss-osgi/bundles/apache-xerces/.project
===================================================================
--- projects/jboss-osgi/bundles/apache-xerces/.project 2009-04-28 20:08:19 UTC (rev 87964)
+++ projects/jboss-osgi/bundles/apache-xerces/.project 2009-04-28 23:10:47 UTC (rev 87965)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>apache-xerces</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
Modified: projects/jboss-osgi/bundles/apache-xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache-xerces/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
+++ projects/jboss-osgi/bundles/apache-xerces/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
@@ -18,6 +18,7 @@
<properties>
<version.apache.xerces>2.9.1</version.apache.xerces>
<version.wutka.dtdparser>1.2.1</version.wutka.dtdparser>
+ <version.xml.resolver>1.2</version.xml.resolver>
</properties>
<dependencies>
@@ -36,6 +37,11 @@
<artifactId>dtdparser121</artifactId>
<version>${version.wutka.dtdparser}</version>
</dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>${version.xml.resolver}</version>
+ </dependency>
</dependencies>
<build>
@@ -53,7 +59,15 @@
</executions>
<configuration>
<instructions>
- <Embed-Dependency>*;inline=false</Embed-Dependency>
+ <Import-Package>
+ !sun.io
+ </Import-Package>
+ <Embed-Dependency>
+ dtdparser121;inline=false,
+ xercesImpl;inline=false,
+ xml-apis;inline=false,
+ xml-resolver;inline=false,
+ </Embed-Dependency>
<_exportcontents>*</_exportcontents>
</instructions>
</configuration>
Property changes on: projects/jboss-osgi/bundles/jboss-common-core
___________________________________________________________________
Name: svn:ignore
+ target
Added: projects/jboss-osgi/bundles/jboss-common-core/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss-common-core/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/jboss-common-core/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi Bundles - JBoss Common Core</name>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-common-core-bundle</artifactId>
+ <packaging>bundle</packaging>
+
+ <version>2.2.11-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <version.jboss.common.core>2.2.11.GA</version.jboss.common.core>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>${version.jboss.common.core}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Import-Package>
+ <!--system -->
+ javax.naming*,
+ javax.net*,
+ javax.xml.namespace,
+ javax.xml.parsers,
+ javax.xml.transform*,
+ org.w3c.dom,
+ org.xml.sax*,
+
+ <!-- import -->
+ org.jboss.logging,
+
+ <!-- ignore -->
+ !org.apache.commons.httpclient,
+ !org.apache.webdav.lib,
+ </Import-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Embed-Dependency>
+ jboss-common-core;inline=false,
+ </Embed-Dependency>
+ <_exportcontents>*</_exportcontents>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/jboss-common-core/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: projects/jboss-osgi/bundles/jbossxb/.project
===================================================================
--- projects/jboss-osgi/bundles/jbossxb/.project 2009-04-28 20:08:19 UTC (rev 87964)
+++ projects/jboss-osgi/bundles/jbossxb/.project 2009-04-28 23:10:47 UTC (rev 87965)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>jbossxb</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
Modified: projects/jboss-osgi/bundles/jbossxb/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jbossxb/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
+++ projects/jboss-osgi/bundles/jbossxb/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
@@ -17,7 +17,7 @@
<properties>
<version.jboss.xb>2.0.0.GA</version.jboss.xb>
- <version.apache.xerces>2.9.1-SNAPSHOT</version.apache.xerces>
+ <version.javasisst>3.9.0.GA</version.javasisst>
</properties>
<dependencies>
@@ -27,9 +27,9 @@
<version>${version.jboss.xb}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>apache-xerces</artifactId>
- <version>${version.apache.xerces}</version>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>${version.javasisst}</version>
</dependency>
</dependencies>
@@ -41,8 +41,32 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Embed-Dependency>jbossxb;inline=false</Embed-Dependency>
- <_exportcontents>*;version=${version.jboss.xb}</_exportcontents>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Import-Package>
+ <!-- system -->
+ javax.activation,
+ javax.xml.bind.*,
+ javax.xml.namespace,
+ javax.xml.parsers,
+ org.w3c.dom*,
+ org.xml.sax*,
+
+ <!-- import -->
+ com.wutka.dtd,
+ javassist*,
+ org.apache.xerces.*,
+ org.jboss.logging,
+ org.jboss.util*,
+
+ <!-- ignore -->
+ !com.sun.jdi*
+ </Import-Package>
+ <Embed-Dependency>
+ javassist;inline=false,
+ jbossxb;inline=false,
+ jboss-reflect;inline=false,
+ </Embed-Dependency>
+ <_exportcontents>*</_exportcontents>
</instructions>
</configuration>
</plugin>
Modified: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 23:10:47 UTC (rev 87965)
@@ -16,6 +16,7 @@
<!-- Modules -->
<modules>
<module>apache-xerces</module>
+ <module>jboss-common-core</module>
<module>jbossxb</module>
</modules>
16 years, 8 months
JBoss-OSGI SVN: r87964 - in projects/jboss-osgi/bundles: apache-xerces and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 16:08:19 -0400 (Tue, 28 Apr 2009)
New Revision: 87964
Added:
projects/jboss-osgi/bundles/apache-xerces/
projects/jboss-osgi/bundles/apache-xerces/pom.xml
projects/jboss-osgi/bundles/jbossxb/
projects/jboss-osgi/bundles/jbossxb/pom.xml
Removed:
projects/jboss-osgi/bundles/apache-xerces/.settings/
projects/jboss-osgi/bundles/apache-xerces/pom.xml
projects/jboss-osgi/bundles/apache/
projects/jboss-osgi/bundles/jboss/
projects/jboss-osgi/bundles/jbossxb/pom.xml
Modified:
projects/jboss-osgi/bundles/
projects/jboss-osgi/bundles/pom.xml
Log:
Reduce svn levels
Property changes on: projects/jboss-osgi/bundles
___________________________________________________________________
Name: svn:ignore
+ .settings
Copied: projects/jboss-osgi/bundles/apache-xerces (from rev 87948, projects/jboss-osgi/bundles/apache/xerces)
Property changes on: projects/jboss-osgi/bundles/apache-xerces
___________________________________________________________________
Name: svn:ignore
+ target
Name: svn:mergeinfo
+
Deleted: projects/jboss-osgi/bundles/apache-xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 15:33:51 UTC (rev 87948)
+++ projects/jboss-osgi/bundles/apache-xerces/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBossOSGi - Bundles Apache Xerces</name>
- <groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>apache-xerces</artifactId>
- <packaging>bundle</packaging>
-
- <version>2.9.1-SNAPSHOT</version>
-
- <parent>
- <groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>jboss-bundles-apache</artifactId>
- <version>1.0.0</version>
- </parent>
-
- <properties>
- <version.apache.xerces>2.9.1</version.apache.xerces>
- <version.wutka.dtdparser>1.2.1</version.wutka.dtdparser>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xml-apis</artifactId>
- <version>${version.apache.xerces}</version>
- </dependency>
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>${version.apache.xerces}</version>
- </dependency>
- <dependency>
- <groupId>wutka-dtdparser</groupId>
- <artifactId>dtdparser121</artifactId>
- <version>${version.wutka.dtdparser}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>wrap</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <instructions>
- <Embed-Dependency>*;inline=false</Embed-Dependency>
- <_exportcontents>*</_exportcontents>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Copied: projects/jboss-osgi/bundles/apache-xerces/pom.xml (from rev 87952, projects/jboss-osgi/bundles/apache/xerces/pom.xml)
===================================================================
--- projects/jboss-osgi/bundles/apache-xerces/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/apache-xerces/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi Bundles - Apache Xerces</name>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>apache-xerces-bundle</artifactId>
+ <packaging>bundle</packaging>
+
+ <version>2.9.1-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <version.apache.xerces>2.9.1</version.apache.xerces>
+ <version.wutka.dtdparser>1.2.1</version.wutka.dtdparser>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>wutka-dtdparser</groupId>
+ <artifactId>dtdparser121</artifactId>
+ <version>${version.wutka.dtdparser}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>wrap</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <instructions>
+ <Embed-Dependency>*;inline=false</Embed-Dependency>
+ <_exportcontents>*</_exportcontents>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Copied: projects/jboss-osgi/bundles/jbossxb (from rev 87951, projects/jboss-osgi/bundles/jboss/xml-binding)
Property changes on: projects/jboss-osgi/bundles/jbossxb
___________________________________________________________________
Name: svn:ignore
+ target
.settings
Name: svn:mergeinfo
+
Deleted: projects/jboss-osgi/bundles/jbossxb/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/jbossxb/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBossOSGi - Bundles JBoss XML Binding</name>
- <groupId>org.jboss.osgi.bundles.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- <packaging>bundle</packaging>
-
- <version>2.0.0-SNAPSHOT</version>
-
- <parent>
- <groupId>org.jboss.osgi.bundles.jboss</groupId>
- <artifactId>jboss-bundles-jboss</artifactId>
- <version>1.0.0</version>
- </parent>
-
- <properties>
- <version.jboss.xb>2.0.0.GA</version.jboss.xb>
- <version.apache.xerces>2.9.1-SNAPSHOT</version.apache.xerces>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- <version>${version.jboss.xb}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>apache-xerces</artifactId>
- <version>${version.apache.xerces}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Embed-Dependency>jbossxb;inline=false</Embed-Dependency>
- <_exportcontents>*;version=${version.jboss.xb}</_exportcontents>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Copied: projects/jboss-osgi/bundles/jbossxb/pom.xml (from rev 87952, projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml)
===================================================================
--- projects/jboss-osgi/bundles/jbossxb/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/jbossxb/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi Bundles - JBoss XML Binding</name>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jbossxb-bundle</artifactId>
+ <packaging>bundle</packaging>
+
+ <version>2.0.0-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <version.jboss.xb>2.0.0.GA</version.jboss.xb>
+ <version.apache.xerces>2.9.1-SNAPSHOT</version.apache.xerces>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jboss.xb}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>apache-xerces</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Embed-Dependency>jbossxb;inline=false</Embed-Dependency>
+ <_exportcontents>*;version=${version.jboss.xb}</_exportcontents>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Modified: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml 2009-04-28 19:27:35 UTC (rev 87963)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 20:08:19 UTC (rev 87964)
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>JBossOSGi - Bundles</name>
+ <name>JBossOSGi Bundles</name>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-bundles</artifactId>
<packaging>pom</packaging>
@@ -15,8 +15,8 @@
<!-- Modules -->
<modules>
- <module>apache</module>
- <module>jboss</module>
+ <module>apache-xerces</module>
+ <module>jbossxb</module>
</modules>
<build>
16 years, 8 months
JBoss-OSGI SVN: r87952 - in projects/jboss-osgi/bundles: apache and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 12:43:13 -0400 (Tue, 28 Apr 2009)
New Revision: 87952
Modified:
projects/jboss-osgi/bundles/apache/pom.xml
projects/jboss-osgi/bundles/apache/xerces/pom.xml
projects/jboss-osgi/bundles/jboss/pom.xml
projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
projects/jboss-osgi/bundles/pom.xml
Log:
use 1.0.0-SNAPSHOT
Modified: projects/jboss-osgi/bundles/apache/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/apache/pom.xml 2009-04-28 16:43:13 UTC (rev 87952)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-bundles</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<!-- Modules -->
Modified: projects/jboss-osgi/bundles/apache/xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 16:43:13 UTC (rev 87952)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.osgi.bundles.apache</groupId>
<artifactId>jboss-bundles-apache</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<properties>
Modified: projects/jboss-osgi/bundles/jboss/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/jboss/pom.xml 2009-04-28 16:43:13 UTC (rev 87952)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-bundles</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<!-- Modules -->
Modified: projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 16:43:13 UTC (rev 87952)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.osgi.bundles.jboss</groupId>
<artifactId>jboss-bundles-jboss</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<properties>
Modified: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 16:43:13 UTC (rev 87952)
@@ -7,12 +7,12 @@
<artifactId>jboss-bundles</artifactId>
<packaging>pom</packaging>
- <version>1.0.0</version>
+ <version>1.0.0-SNAPSHOT</version>
<properties>
<version.aqute.bnd>0.0.323</version.aqute.bnd>
</properties>
-
+
<!-- Modules -->
<modules>
<module>apache</module>
@@ -59,9 +59,28 @@
</snapshots>
</repository>
<repository>
- <id>aQute</id>
- <url>http://www.aQute.biz/repo</url>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
</repository>
</repositories>
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
16 years, 8 months
JBoss-OSGI SVN: r87951 - in projects/jboss-osgi/bundles: apache and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 12:29:33 -0400 (Tue, 28 Apr 2009)
New Revision: 87951
Added:
projects/jboss-osgi/bundles/jboss/xml-binding/.project
Removed:
projects/jboss-osgi/bundles/.settings/
projects/jboss-osgi/bundles/apache/.settings/
projects/jboss-osgi/bundles/apache/xerces/.settings/
projects/jboss-osgi/bundles/jboss/.settings/
Modified:
projects/jboss-osgi/bundles/.project
projects/jboss-osgi/bundles/apache/xerces/pom.xml
projects/jboss-osgi/bundles/jboss/xml-binding/
projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
projects/jboss-osgi/bundles/pom.xml
Log:
add jbossxb-2.0.0-SNAPSHOT
Modified: projects/jboss-osgi/bundles/.project
===================================================================
--- projects/jboss-osgi/bundles/.project 2009-04-28 16:28:36 UTC (rev 87950)
+++ projects/jboss-osgi/bundles/.project 2009-04-28 16:29:33 UTC (rev 87951)
@@ -6,23 +6,12 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Modified: projects/jboss-osgi/bundles/apache/xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 16:28:36 UTC (rev 87950)
+++ projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
@@ -43,7 +43,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
<executions>
<execution>
<phase>package</phase>
Property changes on: projects/jboss-osgi/bundles/jboss/xml-binding
___________________________________________________________________
Name: svn:ignore
+ target
.settings
Added: projects/jboss-osgi/bundles/jboss/xml-binding/.project
===================================================================
--- projects/jboss-osgi/bundles/jboss/xml-binding/.project (rev 0)
+++ projects/jboss-osgi/bundles/jboss/xml-binding/.project 2009-04-28 16:29:33 UTC (rev 87951)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbossxb</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 16:28:36 UTC (rev 87950)
+++ projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
@@ -22,15 +22,15 @@
<dependencies>
<dependency>
- <groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>apache-xerces</artifactId>
- <version>${version.apache.xerces}</version>
- </dependency>
- <dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
<version>${version.jboss.xb}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>apache-xerces</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
</dependencies>
<build>
@@ -38,13 +38,11 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Export-Package>
- org.jboss.xml.binding;version=${version.jboss.xb},
- </Export-Package>
+ <Embed-Dependency>jbossxb;inline=false</Embed-Dependency>
+ <_exportcontents>*;version=${version.jboss.xb}</_exportcontents>
</instructions>
</configuration>
</plugin>
Modified: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml 2009-04-28 16:28:36 UTC (rev 87950)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 16:29:33 UTC (rev 87951)
@@ -9,26 +9,44 @@
<version>1.0.0</version>
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>4</version>
- </parent>
+ <properties>
+ <version.aqute.bnd>0.0.323</version.aqute.bnd>
+ </properties>
+
+ <!-- Modules -->
+ <modules>
+ <module>apache</module>
+ <module>jboss</module>
+ </modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>biz.aQute</groupId>
+ <artifactId>bnd</artifactId>
+ <version>${version.aqute.bnd}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
<url>http://www.jboss.org/community/wiki/JBossOSGi</url>
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi</developerConnection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi
+ </developerConnection>
<url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
</scm>
- <!-- Modules -->
- <modules>
- <module>apache</module>
- <module>jboss</module>
- </modules>
-
<!-- Repositories -->
<repositories>
<repository>
16 years, 8 months
JBoss-OSGI SVN: r87947 - in projects/jboss-osgi/bundles: apache and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 10:54:51 -0400 (Tue, 28 Apr 2009)
New Revision: 87947
Added:
projects/jboss-osgi/bundles/jboss/xml-binding/
projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
Removed:
projects/jboss-osgi/bundles/jboss/.classpath
Modified:
projects/jboss-osgi/bundles/.project
projects/jboss-osgi/bundles/apache/pom.xml
projects/jboss-osgi/bundles/apache/xerces/
projects/jboss-osgi/bundles/apache/xerces/pom.xml
projects/jboss-osgi/bundles/jboss/pom.xml
projects/jboss-osgi/bundles/pom.xml
Log:
use unversioned xerces exports
Modified: projects/jboss-osgi/bundles/.project
===================================================================
--- projects/jboss-osgi/bundles/.project 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/.project 2009-04-28 14:54:51 UTC (rev 87947)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-bundles-parent</name>
+ <name>jboss-bundles</name>
<comment></comment>
<projects>
</projects>
Modified: projects/jboss-osgi/bundles/apache/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/pom.xml 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/apache/pom.xml 2009-04-28 14:54:51 UTC (rev 87947)
@@ -4,12 +4,12 @@
<name>JBossOSGi - Bundles Apache</name>
<groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>jboss-bundles-apache-parent</artifactId>
+ <artifactId>jboss-bundles-apache</artifactId>
<packaging>pom</packaging>
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-bundles-parent</artifactId>
+ <artifactId>jboss-bundles</artifactId>
<version>1.0.0</version>
</parent>
Property changes on: projects/jboss-osgi/bundles/apache/xerces
___________________________________________________________________
Name: svn:ignore
+ target
Modified: projects/jboss-osgi/bundles/apache/xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 14:54:51 UTC (rev 87947)
@@ -5,13 +5,13 @@
<name>JBossOSGi - Bundles Apache Xerces</name>
<groupId>org.jboss.osgi.bundles.apache</groupId>
<artifactId>apache-xerces</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>2.9.1-SNAPSHOT</version>
<parent>
<groupId>org.jboss.osgi.bundles.apache</groupId>
- <artifactId>jboss-bundles-apache-parent</artifactId>
+ <artifactId>jboss-bundles-apache</artifactId>
<version>1.0.0</version>
</parent>
@@ -48,18 +48,14 @@
<execution>
<phase>package</phase>
<goals>
- <goal>bundle</goal>
+ <goal>wrap</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
- <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Export-Package>
- com.wutka.dtd;version=${version.wutka.dtdparser},
- org.apache.xml*;version=${version.apache.xerces},
- org.apache.xerces*;version=${version.apache.xerces},
- </Export-Package>
+ <Embed-Dependency>*;inline=false</Embed-Dependency>
+ <_exportcontents>*</_exportcontents>
</instructions>
</configuration>
</plugin>
Deleted: projects/jboss-osgi/bundles/jboss/.classpath
===================================================================
--- projects/jboss-osgi/bundles/jboss/.classpath 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/jboss/.classpath 2009-04-28 14:54:51 UTC (rev 87947)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: projects/jboss-osgi/bundles/jboss/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/pom.xml 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/jboss/pom.xml 2009-04-28 14:54:51 UTC (rev 87947)
@@ -4,17 +4,18 @@
<name>JBossOSGi - Bundles JBoss</name>
<groupId>org.jboss.osgi.bundles.jboss</groupId>
- <artifactId>jboss-bundles-jboss-parent</artifactId>
+ <artifactId>jboss-bundles-jboss</artifactId>
<packaging>pom</packaging>
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-bundles-parent</artifactId>
+ <artifactId>jboss-bundles</artifactId>
<version>1.0.0</version>
</parent>
<!-- Modules -->
<modules>
+ <module>xml-binding</module>
</modules>
</project>
Copied: projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml (from rev 87938, projects/jboss-osgi/bundles/apache/xerces/pom.xml)
===================================================================
--- projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml 2009-04-28 14:54:51 UTC (rev 87947)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi - Bundles JBoss XML Binding</name>
+ <groupId>org.jboss.osgi.bundles.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <packaging>bundle</packaging>
+
+ <version>2.0.0-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles.jboss</groupId>
+ <artifactId>jboss-bundles-jboss</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <properties>
+ <version.jboss.xb>2.0.0.GA</version.jboss.xb>
+ <version.apache.xerces>2.9.1-SNAPSHOT</version.apache.xerces>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>apache-xerces</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jboss.xb}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Export-Package>
+ org.jboss.xml.binding;version=${version.jboss.xb},
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/jboss/xml-binding/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml 2009-04-28 14:13:01 UTC (rev 87946)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 14:54:51 UTC (rev 87947)
@@ -4,7 +4,7 @@
<name>JBossOSGi - Bundles</name>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-bundles-parent</artifactId>
+ <artifactId>jboss-bundles</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
16 years, 8 months
JBoss-OSGI SVN: r87938 - projects/jboss-osgi/bundles/apache/xerces.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 08:41:26 -0400 (Tue, 28 Apr 2009)
New Revision: 87938
Removed:
projects/jboss-osgi/bundles/apache/xerces/.classpath
Modified:
projects/jboss-osgi/bundles/apache/xerces/.project
projects/jboss-osgi/bundles/apache/xerces/pom.xml
Log:
apache-xerces-2.9.1-SNAPSHOT
Deleted: projects/jboss-osgi/bundles/apache/xerces/.classpath
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.classpath 2009-04-28 11:55:11 UTC (rev 87937)
+++ projects/jboss-osgi/bundles/apache/xerces/.classpath 2009-04-28 12:41:26 UTC (rev 87938)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: projects/jboss-osgi/bundles/apache/xerces/.project
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.project 2009-04-28 11:55:11 UTC (rev 87937)
+++ projects/jboss-osgi/bundles/apache/xerces/.project 2009-04-28 12:41:26 UTC (rev 87938)
@@ -6,8 +6,13 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
<arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
+ </dictionary>
</arguments>
</buildCommand>
<buildCommand>
Modified: projects/jboss-osgi/bundles/apache/xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 11:55:11 UTC (rev 87937)
+++ projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 12:41:26 UTC (rev 87938)
@@ -5,12 +5,65 @@
<name>JBossOSGi - Bundles Apache Xerces</name>
<groupId>org.jboss.osgi.bundles.apache</groupId>
<artifactId>apache-xerces</artifactId>
- <packaging>pom</packaging>
+ <packaging>jar</packaging>
+ <version>2.9.1-SNAPSHOT</version>
+
<parent>
<groupId>org.jboss.osgi.bundles.apache</groupId>
<artifactId>jboss-bundles-apache-parent</artifactId>
<version>1.0.0</version>
</parent>
+ <properties>
+ <version.apache.xerces>2.9.1</version.apache.xerces>
+ <version.wutka.dtdparser>1.2.1</version.wutka.dtdparser>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${version.apache.xerces}</version>
+ </dependency>
+ <dependency>
+ <groupId>wutka-dtdparser</groupId>
+ <artifactId>dtdparser121</artifactId>
+ <version>${version.wutka.dtdparser}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Export-Package>
+ com.wutka.dtd;version=${version.wutka.dtdparser},
+ org.apache.xml*;version=${version.apache.xerces},
+ org.apache.xerces*;version=${version.apache.xerces},
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
16 years, 8 months
JBoss-OSGI SVN: r87937 - in projects/jboss-osgi: bundles and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 07:55:11 -0400 (Tue, 28 Apr 2009)
New Revision: 87937
Added:
projects/jboss-osgi/bundles/
projects/jboss-osgi/bundles/.project
projects/jboss-osgi/bundles/.settings/
projects/jboss-osgi/bundles/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/bundles/.settings/org.maven.ide.eclipse.prefs
projects/jboss-osgi/bundles/apache/
projects/jboss-osgi/bundles/apache/.classpath
projects/jboss-osgi/bundles/apache/.project
projects/jboss-osgi/bundles/apache/.settings/
projects/jboss-osgi/bundles/apache/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/bundles/apache/.settings/org.maven.ide.eclipse.prefs
projects/jboss-osgi/bundles/apache/pom.xml
projects/jboss-osgi/bundles/apache/xerces/
projects/jboss-osgi/bundles/apache/xerces/.classpath
projects/jboss-osgi/bundles/apache/xerces/.project
projects/jboss-osgi/bundles/apache/xerces/.settings/
projects/jboss-osgi/bundles/apache/xerces/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/bundles/apache/xerces/.settings/org.maven.ide.eclipse.prefs
projects/jboss-osgi/bundles/apache/xerces/pom.xml
projects/jboss-osgi/bundles/jboss/
projects/jboss-osgi/bundles/jboss/.classpath
projects/jboss-osgi/bundles/jboss/.project
projects/jboss-osgi/bundles/jboss/.settings/
projects/jboss-osgi/bundles/jboss/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/bundles/jboss/.settings/org.maven.ide.eclipse.prefs
projects/jboss-osgi/bundles/jboss/pom.xml
projects/jboss-osgi/bundles/pom.xml
Log:
Add bundles project
Added: projects/jboss-osgi/bundles/.project
===================================================================
--- projects/jboss-osgi/bundles/.project (rev 0)
+++ projects/jboss-osgi/bundles/.project 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-bundles-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-osgi/bundles/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/bundles/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-osgi/bundles/.settings/org.eclipse.jdt.core.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,5 @@
+#Tue Apr 28 13:52:06 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-osgi/bundles/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/bundles/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-osgi/bundles/.settings/org.maven.ide.eclipse.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,9 @@
+#Tue Apr 28 13:52:03 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/jboss-osgi/bundles/apache/.classpath
===================================================================
--- projects/jboss-osgi/bundles/apache/.classpath (rev 0)
+++ projects/jboss-osgi/bundles/apache/.classpath 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: projects/jboss-osgi/bundles/apache/.project
===================================================================
--- projects/jboss-osgi/bundles/apache/.project (rev 0)
+++ projects/jboss-osgi/bundles/apache/.project 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-bundles-apache-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-osgi/bundles/apache/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/bundles/apache/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-osgi/bundles/apache/.settings/org.eclipse.jdt.core.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,5 @@
+#Tue Apr 28 13:52:08 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-osgi/bundles/apache/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/bundles/apache/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-osgi/bundles/apache/.settings/org.maven.ide.eclipse.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,9 @@
+#Tue Apr 28 13:52:03 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/jboss-osgi/bundles/apache/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/apache/pom.xml 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi - Bundles Apache</name>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>jboss-bundles-apache-parent</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles-parent</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <!-- Modules -->
+ <modules>
+ <module>xerces</module>
+ </modules>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/apache/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/bundles/apache/xerces/.classpath
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.classpath (rev 0)
+++ projects/jboss-osgi/bundles/apache/xerces/.classpath 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: projects/jboss-osgi/bundles/apache/xerces/.project
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.project (rev 0)
+++ projects/jboss-osgi/bundles/apache/xerces/.project 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>apache-xerces</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-osgi/bundles/apache/xerces/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-osgi/bundles/apache/xerces/.settings/org.eclipse.jdt.core.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,5 @@
+#Tue Apr 28 13:52:08 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-osgi/bundles/apache/xerces/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-osgi/bundles/apache/xerces/.settings/org.maven.ide.eclipse.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,9 @@
+#Tue Apr 28 13:52:03 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/jboss-osgi/bundles/apache/xerces/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/apache/xerces/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/apache/xerces/pom.xml 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi - Bundles Apache Xerces</name>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>apache-xerces</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles.apache</groupId>
+ <artifactId>jboss-bundles-apache-parent</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/apache/xerces/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/bundles/jboss/.classpath
===================================================================
--- projects/jboss-osgi/bundles/jboss/.classpath (rev 0)
+++ projects/jboss-osgi/bundles/jboss/.classpath 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: projects/jboss-osgi/bundles/jboss/.project
===================================================================
--- projects/jboss-osgi/bundles/jboss/.project (rev 0)
+++ projects/jboss-osgi/bundles/jboss/.project 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-bundles-jboss-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-osgi/bundles/jboss/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/bundles/jboss/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ projects/jboss-osgi/bundles/jboss/.settings/org.eclipse.jdt.core.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,5 @@
+#Tue Apr 28 13:52:08 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
Added: projects/jboss-osgi/bundles/jboss/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/bundles/jboss/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jboss-osgi/bundles/jboss/.settings/org.maven.ide.eclipse.prefs 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,9 @@
+#Tue Apr 28 13:52:03 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: projects/jboss-osgi/bundles/jboss/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/jboss/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/jboss/pom.xml 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi - Bundles JBoss</name>
+ <groupId>org.jboss.osgi.bundles.jboss</groupId>
+ <artifactId>jboss-bundles-jboss-parent</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles-parent</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <!-- Modules -->
+ <modules>
+ </modules>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/jboss/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/bundles/pom.xml (rev 0)
+++ projects/jboss-osgi/bundles/pom.xml 2009-04-28 11:55:11 UTC (rev 87937)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBossOSGi - Bundles</name>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-bundles-parent</artifactId>
+ <packaging>pom</packaging>
+
+ <version>1.0.0</version>
+
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+
+ <url>http://www.jboss.org/community/wiki/JBossOSGi</url>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi</developerConnection>
+ <url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
+ </scm>
+
+ <!-- Modules -->
+ <modules>
+ <module>apache</module>
+ <module>jboss</module>
+ </modules>
+
+ <!-- Repositories -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>aQute</id>
+ <url>http://www.aQute.biz/repo</url>
+ </repository>
+ </repositories>
+
+</project>
Property changes on: projects/jboss-osgi/bundles/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 8 months
JBoss-OSGI SVN: r87936 - in projects/jboss-osgi/trunk/bundle: blueprint/src/test/java/org/jboss/test/osgi/blueprint and 10 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-28 07:36:05 -0400 (Tue, 28 Apr 2009)
New Revision: 87936
Added:
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java
projects/jboss-osgi/trunk/bundle/deployment/
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleClassLoaderDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleManagementDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaData.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaDataDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleRealDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStartStopDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStructureDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServiceImpl.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/ServiceActivator.java
Removed:
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/helpers/
Modified:
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/SystemBundleTestCase.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java
projects/jboss-osgi/trunk/bundle/deployment/pom.xml
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleClassLoader.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleDeploymentUnitFilter.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentProvidedDeploymentUnitFilter.java
projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/PackageAdminDependencyItem.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
projects/jboss-osgi/trunk/bundle/pom.xml
Log:
Add deployment bundle
Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/SystemBundleTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/SystemBundleTestCase.java 2009-04-28 10:04:21 UTC (rev 87935)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/bootstrap/SystemBundleTestCase.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -42,10 +42,16 @@
{
OSGiBootstrapProvider configProvider = OSGiBootstrap.getBootstrapProvider();
OSGiFramework framework = configProvider.getFramework();
-
- Bundle bundle = framework.getSystemBundle();
+ try
+ {
+ Bundle bundle = framework.getSystemBundle();
- assertEquals("BundleId == 0", 0, bundle.getBundleId());
- assertEquals("SymbolicName", "org.apache.felix.framework", bundle.getSymbolicName());
+ assertEquals("BundleId == 0", 0, bundle.getBundleId());
+ assertEquals("SymbolicName", "org.apache.felix.framework", bundle.getSymbolicName());
+ }
+ finally
+ {
+ framework.stop();
+ }
}
}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,55 @@
+/*
+ * 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.blueprint.deployment;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.test.osgi.blueprint.BlueprintTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A test that checks whether the DeploymentService can be accessed
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Feb-2009
+ */
+public class DeploymentServiceTestCase extends BlueprintTest
+{
+ public void testServiceAccess() throws Exception
+ {
+ OSGiFramework framework = getBootstrapProvider().getFramework();
+ try
+ {
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ //Bundle bundle = installBundle(sysContext, "bundles/jboss-osgi-deployment.jar", true);
+ //assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+
+ }
+ finally
+ {
+ framework.stop();
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/deployment/DeploymentServiceTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java 2009-04-28 10:04:21 UTC (rev 87935)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -69,7 +69,7 @@
public void testBeansDeployment() throws Exception
{
- MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
+ //MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
//mcService.deploy(getTestArchiveURL("mcservice-beans.jar"));
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/deployment (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer)
Property changes on: projects/jboss-osgi/trunk/bundle/deployment
___________________________________________________________________
Name: svn:ignore
+ target
Name: svn:mergeinfo
+
Modified: projects/jboss-osgi/trunk/bundle/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/pom.xml 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/pom.xml 2009-04-28 11:36:05 UTC (rev 87936)
@@ -2,15 +2,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>JBossOSGi - Runtime Deployer</name>
+ <name>JBossOSGi - Bundle Deployment</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-deployer</artifactId>
- <packaging>jar</packaging>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <packaging>bundle</packaging>
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime</artifactId>
+ <artifactId>jboss-osgi-bundle</artifactId>
<version>1.0.0.Beta2</version>
</parent>
@@ -21,6 +21,19 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <!-- Provided DEpendencies -->
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-microcontainer</artifactId>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
@@ -31,14 +44,10 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-spi</artifactId>
<version>${version.jboss.deployers}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
@@ -50,7 +59,39 @@
<!-- Build -->
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>jboss-osgi-deployment</Bundle-SymbolicName>
+ <Bundle-Activator>org.jboss.osgi.deployment.internal.ServiceActivator</Bundle-Activator>
+ <Export-Package>
+ org.jboss.osgi.deployment;version=${version}
+ </Export-Package>
+ <Private-Package>
+ org.jboss.osgi.deployment.internal
+ </Private-Package>
+ <Import-Package>
+ javax.management,
+ org.jboss.dependency.plugins,
+ org.jboss.dependency.spi,
+ org.jboss.deployers.*,
+ org.jboss.logging,
+ org.jboss.osgi.common.log,
+ org.jboss.osgi.spi.management,
+ org.jboss.virtual,
+ org.osgi.framework,
+ org.osgi.service.log,
+ org.osgi.service.packageadmin
+ </Import-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Embed-Dependency>
+ </Embed-Dependency>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>
-
</project>
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-// $Id$
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
-import org.jboss.osgi.deployer.helpers.BundleClassLoader;
-import org.jboss.osgi.deployer.helpers.BundleDeploymentUnitFilter;
-import org.jboss.osgi.deployer.helpers.PackageAdminDependencyItem;
-import org.jboss.osgi.spi.Constants;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * A deployer that attaches a {@link ClassLoaderFactory} that creates a
- * {@link BundleClassLoader} for the deployed Bundle.
- *
- * @author Ales.Justin(a)jboss.org
- * @author Thomas.Diesler(a)jboss.org
- * @since 03-Feb-2009
- */
-public class BundleClassLoaderDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private DeploymentUnitFilter filter = new BundleDeploymentUnitFilter();
- private BundleContext systemContext;
-
- public BundleClassLoaderDeployer()
- {
- super(Bundle.class);
- addOutput(ClassLoaderFactory.class);
- setStage(DeploymentStages.POST_PARSE);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- // create bundle delegate classloader
- ClassLoaderFactory factory = createClassLoaderFactory(bundle);
- unit.addAttachment(ClassLoaderFactory.class, factory);
-
- // create dependency items
- String propStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
- if (Boolean.parseBoolean(propStart != null ? propStart : "true") == false)
- unit.addIDependOn(new PackageAdminDependencyItem(systemContext, bundle));
-
- // skip annotations scanning, if filter is set
- if (filter != null)
- unit.addAttachment(DeploymentUnitFilter.class, filter);
- }
-
- /**
- * Create classloader factory.
- *
- * @param bundle the bundle
- * @return new classloader factory
- */
- protected ClassLoaderFactory createClassLoaderFactory(final Bundle bundle)
- {
- return new ClassLoaderFactory()
- {
- public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
- {
- return BundleClassLoader.createBundleClassLoader(bundle);
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- }
- };
- }
-
- /**
- * Set deployment filter.
- *
- * @param filter the deployment filter
- */
- public void setFilter(DeploymentUnitFilter filter)
- {
- this.filter = filter;
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-// $Id: $
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.management.ManagedBundle;
-import org.osgi.framework.Bundle;
-
-/**
- * Register the Bundle as MBean with JMX.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public class BundleManagementDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private MBeanServer mbeanServer;
-
- public BundleManagementDeployer()
- {
- super(Bundle.class);
- }
-
- public void setMbeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- if (mbeanServer != null)
- {
- ManagedBundle mb = new ManagedBundle(bundle);
- ObjectName oname = mb.getObjectName();
- try
- {
- mbeanServer.registerMBean(mb, oname);
- unit.addAttachment(ManagedBundle.class, mb);
- }
- catch (Exception ex)
- {
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
- }
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, Bundle bundle)
- {
- if (mbeanServer != null)
- {
- try
- {
- ManagedBundle mb = unit.getAttachment(ManagedBundle.class);
- if (mb != null && mbeanServer.isRegistered(mb.getObjectName()))
- mbeanServer.unregisterMBean(mb.getObjectName());
- }
- catch (Exception ex)
- {
- log.warn("Cannot unregister: " + bundle, ex);
- }
- }
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
-
-
-/**
- * The Bundle metadata.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 03-Feb-2009
- */
-public class BundleMetaData extends AbstractManifestMetaData
-{
- private String symbolicName;
- private URL bundleLocation;
-
- // exteralizable usage
- public BundleMetaData()
- {
- }
-
- public BundleMetaData(String symbolicName)
- {
- this.symbolicName = symbolicName;
- }
-
- public String getSymbolicName()
- {
- return symbolicName;
- }
-
- public URL getBundleLocation()
- {
- return bundleLocation;
- }
-
- public void setBundleLocation(URL bundleLocation)
- {
- this.bundleLocation = bundleLocation;
- }
-
- public String toString()
- {
- return "Bundle[name=" + symbolicName + "]";
- }
-}
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-//$Id$
-
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Constants;
-
-/**
- * Create {@link BundleMetaData} from Manifest Headers.
- *
- * If the manifest does not contain a header (named "Bundle-SymbolicName") this deployer does nothing.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 03-Feb-2009
- */
-public class BundleMetaDataDeployer extends ManifestDeployer<BundleMetaData>
-{
- public BundleMetaDataDeployer()
- {
- super(BundleMetaData.class);
- }
-
- @Override
- protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
- {
- BundleMetaData metaData = super.parse(unit, file, root);
- if (metaData != null)
- {
- metaData.setBundleLocation(unit.getRoot().toURL());
- log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
- }
- return metaData;
- }
-
- @Override
- protected BundleMetaData createMetaData(Manifest manifest) throws Exception
- {
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName != null)
- return new BundleMetaData(symbolicName);
-
- return null;
- }
-}
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-//$Id$
-
-import java.net.URL;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * Installs the Bundle into the Framework's SystemContext.
- *
- * This deployer does not start the bundle. It leaves it in state INSTALLED.
- * On undeploy the Bundle gets uninstalled from the Framework's SystemContext.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Ales.Justin(a)jboss.org
- * @since 03-Feb-2009
- */
-public class BundleRealDeployer extends AbstractSimpleRealDeployer<BundleMetaData>
-{
- private BundleContext systemContext;
- private List<URL> skipBundles;
-
- public BundleRealDeployer()
- {
- super(BundleMetaData.class);
- addOutput(Bundle.class);
- setStage(DeploymentStages.POST_PARSE);
- }
-
- public void setSystemContext(BundleContext bundleContext)
- {
- this.systemContext = bundleContext;
- }
-
- public void setSkipBundles(List<URL> skipBundles)
- {
- this.skipBundles = skipBundles;
- }
-
- public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
- {
- URL bundleURL = metadata.getBundleLocation();
- if (bundleURL == null)
- throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
-
- String bundlePath = bundleURL.getPath();
- if (bundlePath.endsWith("/"))
- bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
-
- try
- {
- if (skipBundles != null)
- {
- boolean skipBundle = false;
- for (URL skip : skipBundles)
- {
- String skipPath = skip.getPath();
- if (skipPath.equals(bundlePath))
- {
- skipBundle = true;
- break;
- }
- }
- if (skipBundle == false)
- {
- Bundle bundle = systemContext.installBundle(bundleURL.toString());
- unit.addAttachment(Bundle.class, bundle);
-
- log.info("Installed: " + bundle);
- }
- }
- }
- catch (BundleException ex)
- {
- throw DeploymentException.rethrowAsDeploymentException("Cannot install bundle: " + metadata, ex);
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, BundleMetaData osGiMetaData)
- {
- Bundle bundle = unit.getAttachment(Bundle.class);
- if (bundle != null)
- {
- try
- {
- bundle.uninstall();
- log.info("Uninstalled: " + bundle);
- }
- catch (BundleException ex)
- {
- log.warn(ex);
- }
- }
- }
-}
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,152 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-// $Id: $
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.Constants;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * This is the Bundle start/stop Deployer
- *
- * @author Ales.Justin(a)jboss.org
- * @author Thomas.Diesler(a)jboss.com
- * @since 27-Feb-2009
- */
-public class BundleStartStopDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private BundleContext systemContext;
- private PackageAdmin packageAdmin;
-
- // The list of unresolved bundles
- private List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
-
- public BundleStartStopDeployer()
- {
- super(Bundle.class);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- String propStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
- if (Boolean.parseBoolean(propStart != null ? propStart : "true") == true)
- {
- deferredStart(unit, bundle);
- }
- else
- {
- simpleStart(unit, bundle);
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, Bundle bundle)
- {
- try
- {
- bundle.stop();
-
- unresolvedBundles.remove(bundle);
-
- log.info("Stoped: " + bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot stop bundle: " + e);
- }
- }
-
- private void simpleStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- try
- {
- bundle.start();
- log.info("Started: " + bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot start bundle", e);
- }
- }
-
- private void deferredStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- // Get the required dependency on the PackageAdmin service
- if (packageAdmin == null)
- {
- ServiceReference sref = systemContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin)systemContext.getService(sref);
- if (packageAdmin == null)
- throw new IllegalStateException("Cannot obtain PackageAdmin service");
- }
-
- // Always add the bundle as unresolved
- unresolvedBundles.add(bundle);
-
- Bundle[] bundleArr = new Bundle[unresolvedBundles.size()];
- unresolvedBundles.toArray(bundleArr);
-
- // Try to resolve the bundles
- packageAdmin.resolveBundles(bundleArr);
-
- // Find resolved bundles and start them
- Iterator<Bundle> it = unresolvedBundles.iterator();
- while (it.hasNext())
- {
- Bundle auxBundle = it.next();
- if ((Bundle.RESOLVED & auxBundle.getState()) == Bundle.RESOLVED)
- {
- it.remove();
- try
- {
- auxBundle.start();
- log.info("Started: " + bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot start bundle", e);
- }
- }
- }
-
- // Report unresolved bundles
- if (unresolvedBundles.size() > 0)
- log.info("Unresolved: " + unresolvedBundles);
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployer;
-
-// $Id$
-
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
-import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Constants;
-
-/**
- * Determine the structure of a Bundle deployment.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 16-Apr-2009
- */
-public class BundleStructureDeployer extends AbstractVFSStructureDeployer
-{
- /**
- * Sets the default relative order 9000.
- */
- public BundleStructureDeployer()
- {
- setRelativeOrder(9000);
- }
-
- /**
- * Determine the structure of a bundle deployment
- *
- * @param context the structure context
- * @return true when it recognised the context
- * @throws DeploymentException for an error
- */
- public boolean determineStructure(StructureContext structureContext) throws DeploymentException
- {
- ContextInfo context = null;
- VirtualFile file = structureContext.getFile();
- VirtualFile root = structureContext.getRoot();
-
- try
- {
- // This file is not for me, because I'm only interested
- // in root deployments that contain a MANIFEST.MF
- Manifest manifest = VFSUtils.getManifest(file);
- if (file != root || manifest == null)
- return false;
-
- // This file is also not for me, because I need to see Bundle-SymbolicName
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName == null)
- return false;
-
- // Create a context for this jar file with META-INF as the location for metadata
- context = createContext(structureContext, "META-INF");
-
- return true;
- }
- catch (Exception e)
- {
- // Remove the invalid context
- if (context != null)
- structureContext.removeChild(context);
-
- throw DeploymentException.rethrowAsDeploymentException("Error determining structure: " + file.getName(), e);
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleClassLoaderDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleClassLoaderDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleClassLoaderDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+// $Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+import org.jboss.osgi.deployment.internal.BundleClassLoader;
+import org.jboss.osgi.deployment.internal.BundleDeploymentUnitFilter;
+import org.jboss.osgi.deployment.internal.PackageAdminDependencyItem;
+import org.jboss.osgi.spi.Constants;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A deployer that attaches a {@link ClassLoaderFactory} that creates a
+ * {@link BundleClassLoader} for the deployed Bundle.
+ *
+ * @author Ales.Justin(a)jboss.org
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleClassLoaderDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private DeploymentUnitFilter filter = new BundleDeploymentUnitFilter();
+ private BundleContext systemContext;
+
+ public BundleClassLoaderDeployer()
+ {
+ super(Bundle.class);
+ addOutput(ClassLoaderFactory.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void setSystemContext(BundleContext systemContext)
+ {
+ this.systemContext = systemContext;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ // create bundle delegate classloader
+ ClassLoaderFactory factory = createClassLoaderFactory(bundle);
+ unit.addAttachment(ClassLoaderFactory.class, factory);
+
+ // create dependency items
+ String propStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
+ if (Boolean.parseBoolean(propStart != null ? propStart : "true") == false)
+ unit.addIDependOn(new PackageAdminDependencyItem(systemContext, bundle));
+
+ // skip annotations scanning, if filter is set
+ if (filter != null)
+ unit.addAttachment(DeploymentUnitFilter.class, filter);
+ }
+
+ /**
+ * Create classloader factory.
+ *
+ * @param bundle the bundle
+ * @return new classloader factory
+ */
+ protected ClassLoaderFactory createClassLoaderFactory(final Bundle bundle)
+ {
+ return new ClassLoaderFactory()
+ {
+ public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+ {
+ return BundleClassLoader.createBundleClassLoader(bundle);
+ }
+
+ public void removeClassLoader(DeploymentUnit unit) throws Exception
+ {
+ }
+ };
+ }
+
+ /**
+ * Set deployment filter.
+ *
+ * @param filter the deployment filter
+ */
+ public void setFilter(DeploymentUnitFilter filter)
+ {
+ this.filter = filter;
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleManagementDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleManagementDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleManagementDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+// $Id: $
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.management.ManagedBundle;
+import org.osgi.framework.Bundle;
+
+/**
+ * Register the Bundle as MBean with JMX.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public class BundleManagementDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private MBeanServer mbeanServer;
+
+ public BundleManagementDeployer()
+ {
+ super(Bundle.class);
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ if (mbeanServer != null)
+ {
+ ManagedBundle mb = new ManagedBundle(bundle);
+ ObjectName oname = mb.getObjectName();
+ try
+ {
+ mbeanServer.registerMBean(mb, oname);
+ unit.addAttachment(ManagedBundle.class, mb);
+ }
+ catch (Exception ex)
+ {
+ DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, Bundle bundle)
+ {
+ if (mbeanServer != null)
+ {
+ try
+ {
+ ManagedBundle mb = unit.getAttachment(ManagedBundle.class);
+ if (mb != null && mbeanServer.isRegistered(mb.getObjectName()))
+ mbeanServer.unregisterMBean(mb.getObjectName());
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot unregister: " + bundle, ex);
+ }
+ }
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaData.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaData.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaData.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
+
+
+/**
+ * The Bundle metadata.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleMetaData extends AbstractManifestMetaData
+{
+ private String symbolicName;
+ private URL bundleLocation;
+
+ // exteralizable usage
+ public BundleMetaData()
+ {
+ }
+
+ public BundleMetaData(String symbolicName)
+ {
+ this.symbolicName = symbolicName;
+ }
+
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ public URL getBundleLocation()
+ {
+ return bundleLocation;
+ }
+
+ public void setBundleLocation(URL bundleLocation)
+ {
+ this.bundleLocation = bundleLocation;
+ }
+
+ public String toString()
+ {
+ return "Bundle[name=" + symbolicName + "]";
+ }
+}
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaDataDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaDataDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleMetaDataDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+//$Id$
+
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Constants;
+
+/**
+ * Create {@link BundleMetaData} from Manifest Headers.
+ *
+ * If the manifest does not contain a header (named "Bundle-SymbolicName") this deployer does nothing.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleMetaDataDeployer extends ManifestDeployer<BundleMetaData>
+{
+ public BundleMetaDataDeployer()
+ {
+ super(BundleMetaData.class);
+ }
+
+ @Override
+ protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
+ {
+ BundleMetaData metaData = super.parse(unit, file, root);
+ if (metaData != null)
+ {
+ metaData.setBundleLocation(unit.getRoot().toURL());
+ log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
+ }
+ return metaData;
+ }
+
+ @Override
+ protected BundleMetaData createMetaData(Manifest manifest) throws Exception
+ {
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName != null)
+ return new BundleMetaData(symbolicName);
+
+ return null;
+ }
+}
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleRealDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleRealDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleRealDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+//$Id$
+
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * Installs the Bundle into the Framework's SystemContext.
+ *
+ * This deployer does not start the bundle. It leaves it in state INSTALLED.
+ * On undeploy the Bundle gets uninstalled from the Framework's SystemContext.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Ales.Justin(a)jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleRealDeployer extends AbstractSimpleRealDeployer<BundleMetaData>
+{
+ private BundleContext systemContext;
+ private List<URL> skipBundles;
+
+ public BundleRealDeployer()
+ {
+ super(BundleMetaData.class);
+ addOutput(Bundle.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void setSystemContext(BundleContext bundleContext)
+ {
+ this.systemContext = bundleContext;
+ }
+
+ public void setSkipBundles(List<URL> skipBundles)
+ {
+ this.skipBundles = skipBundles;
+ }
+
+ public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
+ {
+ URL bundleURL = metadata.getBundleLocation();
+ if (bundleURL == null)
+ throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
+
+ String bundlePath = bundleURL.getPath();
+ if (bundlePath.endsWith("/"))
+ bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
+
+ try
+ {
+ if (skipBundles != null)
+ {
+ boolean skipBundle = false;
+ for (URL skip : skipBundles)
+ {
+ String skipPath = skip.getPath();
+ if (skipPath.equals(bundlePath))
+ {
+ skipBundle = true;
+ break;
+ }
+ }
+ if (skipBundle == false)
+ {
+ Bundle bundle = systemContext.installBundle(bundleURL.toString());
+ unit.addAttachment(Bundle.class, bundle);
+
+ log.info("Installed: " + bundle);
+ }
+ }
+ }
+ catch (BundleException ex)
+ {
+ throw DeploymentException.rethrowAsDeploymentException("Cannot install bundle: " + metadata, ex);
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, BundleMetaData osGiMetaData)
+ {
+ Bundle bundle = unit.getAttachment(Bundle.class);
+ if (bundle != null)
+ {
+ try
+ {
+ bundle.uninstall();
+ log.info("Uninstalled: " + bundle);
+ }
+ catch (BundleException ex)
+ {
+ log.warn(ex);
+ }
+ }
+ }
+}
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStartStopDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStartStopDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStartStopDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+// $Id: $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.Constants;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * This is the Bundle start/stop Deployer
+ *
+ * @author Ales.Justin(a)jboss.org
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 27-Feb-2009
+ */
+public class BundleStartStopDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private BundleContext systemContext;
+ private PackageAdmin packageAdmin;
+
+ // The list of unresolved bundles
+ private List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
+
+ public BundleStartStopDeployer()
+ {
+ super(Bundle.class);
+ }
+
+ public void setSystemContext(BundleContext systemContext)
+ {
+ this.systemContext = systemContext;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ String propStart = systemContext.getProperty(Constants.PROPERTY_DEFERRED_START);
+ if (Boolean.parseBoolean(propStart != null ? propStart : "true") == true)
+ {
+ deferredStart(unit, bundle);
+ }
+ else
+ {
+ simpleStart(unit, bundle);
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, Bundle bundle)
+ {
+ try
+ {
+ bundle.stop();
+
+ unresolvedBundles.remove(bundle);
+
+ log.info("Stoped: " + bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot stop bundle: " + e);
+ }
+ }
+
+ private void simpleStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ try
+ {
+ bundle.start();
+ log.info("Started: " + bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot start bundle", e);
+ }
+ }
+
+ private void deferredStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ // Get the required dependency on the PackageAdmin service
+ if (packageAdmin == null)
+ {
+ ServiceReference sref = systemContext.getServiceReference(PackageAdmin.class.getName());
+ packageAdmin = (PackageAdmin)systemContext.getService(sref);
+ if (packageAdmin == null)
+ throw new IllegalStateException("Cannot obtain PackageAdmin service");
+ }
+
+ // Always add the bundle as unresolved
+ unresolvedBundles.add(bundle);
+
+ Bundle[] bundleArr = new Bundle[unresolvedBundles.size()];
+ unresolvedBundles.toArray(bundleArr);
+
+ // Try to resolve the bundles
+ packageAdmin.resolveBundles(bundleArr);
+
+ // Find resolved bundles and start them
+ Iterator<Bundle> it = unresolvedBundles.iterator();
+ while (it.hasNext())
+ {
+ Bundle auxBundle = it.next();
+ if ((Bundle.RESOLVED & auxBundle.getState()) == Bundle.RESOLVED)
+ {
+ it.remove();
+ try
+ {
+ auxBundle.start();
+ log.info("Started: " + bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot start bundle", e);
+ }
+ }
+ }
+
+ // Report unresolved bundles
+ if (unresolvedBundles.size() > 0)
+ log.info("Unresolved: " + unresolvedBundles);
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStructureDeployer.java (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStructureDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/BundleStructureDeployer.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+// $Id$
+
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.structure.ContextInfo;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Constants;
+
+/**
+ * Determine the structure of a Bundle deployment.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 16-Apr-2009
+ */
+public class BundleStructureDeployer extends AbstractVFSStructureDeployer
+{
+ /**
+ * Sets the default relative order 9000.
+ */
+ public BundleStructureDeployer()
+ {
+ setRelativeOrder(9000);
+ }
+
+ /**
+ * Determine the structure of a bundle deployment
+ *
+ * @param context the structure context
+ * @return true when it recognised the context
+ * @throws DeploymentException for an error
+ */
+ public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+ {
+ ContextInfo context = null;
+ VirtualFile file = structureContext.getFile();
+ VirtualFile root = structureContext.getRoot();
+
+ try
+ {
+ // This file is not for me, because I'm only interested
+ // in root deployments that contain a MANIFEST.MF
+ Manifest manifest = VFSUtils.getManifest(file);
+ if (file != root || manifest == null)
+ return false;
+
+ // This file is also not for me, because I need to see Bundle-SymbolicName
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName == null)
+ return false;
+
+ // Create a context for this jar file with META-INF as the location for metadata
+ context = createContext(structureContext, "META-INF");
+
+ return true;
+ }
+ catch (Exception e)
+ {
+ // Remove the invalid context
+ if (context != null)
+ structureContext.removeChild(context);
+
+ throw DeploymentException.rethrowAsDeploymentException("Error determining structure: " + file.getName(), e);
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.osgi.deployment;
+
+// $Id$
+
+/**
+ * The JBossOSGi deployment service
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 28-Apr-2009
+ */
+public interface DeploymentService
+{
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal (from rev 87920, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers)
Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleClassLoader.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleClassLoader.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleClassLoader.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -19,7 +19,7 @@
* 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.osgi.deployer.helpers;
+package org.jboss.osgi.deployment.internal;
// $Id: $
Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/BundleDeploymentUnitFilter.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/BundleDeploymentUnitFilter.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -19,7 +19,7 @@
* 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.osgi.deployer.helpers;
+package org.jboss.osgi.deployment.internal;
// $Id$
Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/DeploymentProvidedDeploymentUnitFilter.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentProvidedDeploymentUnitFilter.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -19,7 +19,7 @@
* 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.osgi.deployer.helpers;
+package org.jboss.osgi.deployment.internal;
// $Id$
Added: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServiceImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServiceImpl.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -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.osgi.deployment.internal;
+
+//$Id$
+
+import org.jboss.osgi.deployment.DeploymentService;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The DeploymentService implementation
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 28-Apr-2009
+ */
+public class DeploymentServiceImpl implements DeploymentService
+{
+ public DeploymentServiceImpl(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/PackageAdminDependencyItem.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/helpers/PackageAdminDependencyItem.java 2009-04-28 04:35:10 UTC (rev 87920)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/PackageAdminDependencyItem.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -19,7 +19,7 @@
* 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.osgi.deployer.helpers;
+package org.jboss.osgi.deployment.internal;
import org.jboss.dependency.plugins.AbstractDependencyItem;
import org.jboss.dependency.spi.ControllerState;
Added: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/ServiceActivator.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -0,0 +1,62 @@
+/*
+ * 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.osgi.deployment.internal;
+
+//$Id$
+
+import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.deployment.DeploymentService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.log.LogService;
+
+/**
+ * A BundleActivator that registers the {@link DeploymentService}
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Apr-2009
+ */
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+ private LogService log;
+
+ public void start(BundleContext context)
+ {
+ log = new LogServiceTracker(context);
+
+ log.log(LogService.LOG_DEBUG, "Register DeploymentService");
+ DeploymentServiceImpl service = new DeploymentServiceImpl(context);
+ registration = context.registerService(DeploymentService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ log.log(LogService.LOG_DEBUG, "Unregister DeploymentService");
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/deployment/src/main/java/org/jboss/osgi/deployment/internal/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-04-28 10:04:21 UTC (rev 87935)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -44,7 +44,7 @@
/**
* The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
*/
- String BEAN_MBEAN_SERVER = "jboss.osgi:service=SystemBundleContext";
+ String BEAN_MBEAN_SERVER = "jboss.osgi:service=MBeanServer";
/**
* The name under which the Kernel is registered: 'jboss.osgi:service=Kernel'
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-04-28 10:04:21 UTC (rev 87935)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-04-28 11:36:05 UTC (rev 87936)
@@ -47,7 +47,7 @@
import org.osgi.util.tracker.ServiceTracker;
/**
- * A BundleActivator that registers the Microcontainer Service
+ * A BundleActivator that registers the {@link MicrocontainerService}
*
* @author thomas.diesler(a)jboss.com
* @since 24-Apr-2009
@@ -74,9 +74,12 @@
{
if (registration != null)
{
+ MBeanServer server = (MBeanServer)mbeanServerTracker.getService();
+ if (server != null)
+ unregisterMBean(server);
+
log.log(LogService.LOG_DEBUG, "Unregister MicrocontainerService");
registration.unregister();
- unregisterMBean(context);
registration = null;
}
}
@@ -99,10 +102,9 @@
}
}
- private void unregisterMBean(BundleContext context)
+ private void unregisterMBean(MBeanServer server)
{
- MBeanServer server = (MBeanServer)mbeanServerTracker.getService();
- if (server != null && server.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
+ if (server.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
{
try
{
@@ -163,6 +165,9 @@
@Override
public void removedService(ServiceReference reference, Object service)
{
+ // Unregister MBean
+ unregisterMBean((MBeanServer)service);
+
// Uninstall the MBeanServer from the Kernel
try
{
Modified: projects/jboss-osgi/trunk/bundle/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/pom.xml 2009-04-28 10:04:21 UTC (rev 87935)
+++ projects/jboss-osgi/trunk/bundle/pom.xml 2009-04-28 11:36:05 UTC (rev 87936)
@@ -11,15 +11,16 @@
<version>1.0.0.Beta2</version>
</parent>
- <!-- Modules -->
+ <!-- Modules -->
<modules>
<module>blueprint</module>
<module>common</module>
+ <!-- module>deployment</module -->
<module>jmx</module>
<module>logging</module>
<module>microcontainer</module>
<module>remotelog</module>
<module>webconsole</module>
</modules>
-
+
</project>
16 years, 8 months
JBoss-OSGI SVN: r87916 - in projects/jboss-osgi/trunk: bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint and 10 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-27 23:47:49 -0400 (Mon, 27 Apr 2009)
New Revision: 87916
Added:
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/SomeService.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/mcservice-bundle.bnd
Removed:
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/MicrocontainerTestService.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/microcontainer-test.bnd
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/microcontainer/
Modified:
projects/jboss-osgi/trunk/bundle/blueprint/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-example-jars.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
Log:
More work on MCService - ready to deploy beans.xml
Modified: projects/jboss-osgi/trunk/bundle/blueprint/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/scripts/antrun-test-jars.xml 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/blueprint/scripts/antrun-test-jars.xml 2009-04-28 03:47:49 UTC (rev 87916)
@@ -46,8 +46,17 @@
<!-- jmx-test -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jmx-test.jar" files="${tests.resources.dir}/jmx/jmx-test.bnd" />
- <!-- microcontainer-test -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/microcontainer-test.jar" files="${tests.resources.dir}/microcontainer/microcontainer-test.bnd" />
+ <!-- mcservice-test -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/mcservice-bundle.jar" files="${tests.resources.dir}/mcservice/mcservice-bundle.bnd" />
+ <jar jarfile="${tests.output.dir}/test-libs/mcservice-beans.jar">
+ <fileset dir="${tests.classes.dir}">
+ <include name="org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.class" />
+ <include name="org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.class" />
+ </fileset>
+ <fileset dir="${tests.resources.dir}/mcservice">
+ <include name="META-INF/mcservice-jboss-beans.xml" />
+ </fileset>
+ </jar>
<!-- Please add alphabetically -->
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java (from rev 87908, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/MicrocontainerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/MCServiceTestCase.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,75 @@
+/*
+ * 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.blueprint.mcservice;
+
+//$Id$
+
+import static org.jboss.osgi.microcontainer.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
+import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_MBEAN_SERVER;
+import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_KERNEL;
+
+import java.util.List;
+
+import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.test.osgi.blueprint.BlueprintTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A test that checks whether the MicrocontainerService can be accessed
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Feb-2009
+ */
+public class MCServiceTestCase extends BlueprintTest
+{
+ public void testMCServiceAccess() throws Exception
+ {
+ OSGiFramework framework = getBootstrapProvider().getFramework();
+ try
+ {
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundle = installBundle(sysContext, "mcservice-bundle.jar", true);
+ assertEquals("Test bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
+
+ MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
+ List<String> registeredBeans = mcService.getRegisteredBeans();
+ assertTrue("MicrocontainerService registered with MC", registeredBeans.contains(BEAN_SYSTEM_BUNDLE_CONTEXT));
+ assertTrue("MBeanServer registered with MC", registeredBeans.contains(BEAN_MBEAN_SERVER));
+ assertTrue("Kernel registered with MC", registeredBeans.contains(BEAN_KERNEL));
+ }
+ finally
+ {
+ framework.stop();
+ }
+ }
+
+ public void testBeansDeployment() throws Exception
+ {
+ MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, getMBeanServer());
+ //mcService.deploy(getTestArchiveURL("mcservice-beans.jar"));
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,75 @@
+/*
+ * 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.blueprint.mcservice.beans;
+
+//$Id$
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.test.osgi.blueprint.mcservice.bundle.SomeService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An MC bean that accesses some OSGi service
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Apr-2009
+ */
+public class SomeBean implements SomeBeanMBean
+{
+ private BundleContext context;
+ private MBeanServer mbeanServer;
+
+ public void setBundleContext(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ public void setMbeanServer(MBeanServer server)
+ {
+ this.mbeanServer = server;
+ }
+
+ public void create() throws Exception
+ {
+ mbeanServer.registerMBean(this, new ObjectName("jboss.osgi:service=SomeBean"));
+ }
+
+ public void destroy() throws Exception
+ {
+ mbeanServer.unregisterMBean(new ObjectName("jboss.osgi:service=SomeBean"));
+ }
+
+ public String callSomeService(String msg)
+ {
+ ServiceReference sref = context.getServiceReference(SomeService.class.getName());
+ SomeService service = (SomeService)context.getService(sref);
+ return service.echo(msg);
+ }
+
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,31 @@
+/*
+ * 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.blueprint.mcservice.beans;
+
+//$Id$
+
+public interface SomeBeanMBean
+{
+ String callSomeService(String msg);
+
+ String echo(String msg);
+}
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/beans/SomeBeanMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle (from rev 87908, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/bundle)
Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/MicrocontainerTestService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/bundle/MicrocontainerTestService.java 2009-04-27 23:05:19 UTC (rev 87908)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/MicrocontainerTestService.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -1,51 +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.blueprint.microcontainer.bundle;
-
-//$Id$
-
-import org.jboss.osgi.microcontainer.MicrocontainerService;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * A service that accesses the MicrocontainerService
- *
- * @author thomas.diesler(a)jboss.com
- * @since 24-Apr-2009
- */
-public class MicrocontainerTestService
-{
- public MicrocontainerTestService(BundleContext context)
- {
- ServiceTracker tracker = new ServiceTracker(context, MicrocontainerService.class.getName(), null);
- tracker.open();
-
- MicrocontainerService mcService = (MicrocontainerService)tracker.getService();
- if (mcService == null)
- throw new IllegalStateException("No MicrocontainerService");
-
- Object sysContextBean = mcService.getRegisteredBean(MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT);
- if (sysContextBean == null)
- throw new IllegalStateException("No OSGi System Context as MC Bean");
- }
-}
Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/bundle/ServiceActivator.java 2009-04-27 23:05:19 UTC (rev 87908)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/ServiceActivator.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -19,7 +19,7 @@
* 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.blueprint.microcontainer.bundle;
+package org.jboss.test.osgi.blueprint.mcservice.bundle;
//$Id$
@@ -36,8 +36,8 @@
{
public void start(BundleContext context)
{
- MicrocontainerTestService service = new MicrocontainerTestService(context);
- context.registerService(MicrocontainerTestService.class.getName(), service, null);
+ SomeService service = new SomeService(context);
+ context.registerService(SomeService.class.getName(), service, null);
}
public void stop(BundleContext context)
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/SomeService.java (from rev 87908, projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/microcontainer/bundle/MicrocontainerTestService.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/SomeService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/mcservice/bundle/SomeService.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,73 @@
+/*
+ * 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.blueprint.mcservice.bundle;
+
+//$Id$
+
+import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+
+import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A service that accesses the MicrocontainerService
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Apr-2009
+ */
+public class SomeService
+{
+ private BundleContext context;
+
+ public SomeService(BundleContext context)
+ {
+ this.context = context;
+
+ MicrocontainerService mcService = getMicrocontainerService();
+ BundleContext bundleContext = (BundleContext)mcService.getRegisteredBean(BEAN_SYSTEM_BUNDLE_CONTEXT);
+ if (bundleContext == null)
+ throw new IllegalStateException("No BundleContext as MC Bean");
+ }
+
+// public String callSomeBean(String msg)
+// {
+// MicrocontainerService mcService = getMicrocontainerService();
+// SomeBean bean = (SomeBean)mcService.getRegisteredBean(SomeBean.class.getName());
+// return bean.echo(msg);
+// }
+
+ public String echo(String msg)
+ {
+ return msg;
+ }
+
+ private MicrocontainerService getMicrocontainerService()
+ {
+ ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+ MicrocontainerService service = (MicrocontainerService)context.getService(sref);
+ if (service == null)
+ throw new IllegalStateException("No MicrocontainerService");
+
+ return service;
+ }
+}
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice (from rev 87908, projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/microcontainer)
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,7 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="SomeBean" class="org.jboss.test.osgi.blueprint.mcservice.beans.SomeBean">
+ </bean>
+
+</deployment>
+
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/mcservice-bundle.bnd (from rev 87908, projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/microcontainer/microcontainer-test.bnd)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/mcservice-bundle.bnd (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/mcservice-bundle.bnd 2009-04-28 03:47:49 UTC (rev 87916)
@@ -0,0 +1,8 @@
+# bnd build -classpath target/test-classes -output target/test-libs/mcservice-bundle.jar src/test/resources/mcservice/mcservice-bundle.bnd
+
+Bundle-SymbolicName: mcservice-test
+Bundle-Activator: org.jboss.test.osgi.blueprint.mcservice.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.blueprint.mcservice.bundle
+Import-Package: org.jboss.osgi.microcontainer, org.osgi.framework
+
+#org.jboss.test.osgi.blueprint.mcservice.beans;resolution=optional
Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/microcontainer-test.bnd
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/microcontainer/microcontainer-test.bnd 2009-04-27 23:05:19 UTC (rev 87908)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/mcservice/microcontainer-test.bnd 2009-04-28 03:47:49 UTC (rev 87916)
@@ -1,5 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/microcontainer-test.jar src/test/resources/microcontainer/microcontainer-test.bnd
-
-Bundle-SymbolicName: microcontainer-test
-Bundle-Activator: org.jboss.test.osgi.blueprint.microcontainer.bundle.ServiceActivator
-Export-Package: org.jboss.test.osgi.blueprint.microcontainer.bundle
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -23,6 +23,7 @@
//$Id$
+import java.net.URL;
import java.util.List;
import org.jboss.kernel.Kernel;
@@ -36,10 +37,20 @@
public interface MicrocontainerService
{
/**
- * The bean name under which the system bundle context is registered: 'jboss.osgi:service=SystemBundleContext'
+ * The name under which the system bundle context is registered: 'jboss.osgi:service=SystemBundleContext'
*/
String BEAN_SYSTEM_BUNDLE_CONTEXT = "jboss.osgi:service=SystemBundleContext";
+ /**
+ * The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
+ */
+ String BEAN_MBEAN_SERVER = "jboss.osgi:service=SystemBundleContext";
+
+ /**
+ * The name under which the Kernel is registered: 'jboss.osgi:service=Kernel'
+ */
+ String BEAN_KERNEL = "jboss.osgi:service=Kernel";
+
/**
* Get the Microcontainer Kernel
*/
@@ -55,4 +66,14 @@
* @return null if there is no bean registered under this name
*/
Object getRegisteredBean(String beanName);
+
+ /**
+ * Deploy MC beans from URL
+ */
+ void deploy(URL url);
+
+ /**
+ * Undeploy MC beans from URL
+ */
+ void undeploy(URL url);
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -23,6 +23,7 @@
//$Id$
+import java.net.URL;
import java.util.List;
import javax.management.ObjectName;
@@ -46,4 +47,14 @@
* Get the list of registered beans.
*/
List<String> getRegisteredBeans();
+
+ /**
+ * Deploy MC beans from URL
+ */
+ void deploy(URL url);
+
+ /**
+ * Undeploy MC beans from URL
+ */
+ void undeploy(URL url);
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -47,7 +47,7 @@
this.log = new LogServiceTracker(context);
// Get or bootstrap the kernel
- if (getKernel() == null)
+ if (kernel == null)
{
try
{
@@ -62,8 +62,8 @@
deployer = new BasicXMLDeployer(kernel);
}
- /*
- * * Deploy MC beans from URL
+ /**
+ * Deploy MC beans from URL
*/
public void deploy(URL url)
{
@@ -79,8 +79,8 @@
}
}
- /*
- * * Undeploy MC beans from URL
+ /**
+ * Undeploy MC beans from URL
*/
public void undeploy(URL url)
{
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -23,6 +23,7 @@
//$Id$
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -32,8 +33,10 @@
import org.jboss.dependency.plugins.AbstractControllerContextActions;
import org.jboss.dependency.plugins.action.ControllerContextAction;
import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerContextActions;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.osgi.microcontainer.MicrocontainerService;
import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
import org.osgi.framework.BundleContext;
@@ -46,19 +49,20 @@
*/
public class MicrocontainerServiceImpl implements MicrocontainerService, MicrocontainerServiceMBean
{
- private Kernel kernel;
+ private EmbeddedBeansDeployer deployer;
public MicrocontainerServiceImpl(BundleContext context)
{
- EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer(context);
- kernel = deployer.getKernel();
+ deployer = new EmbeddedBeansDeployer(context);
- // Register the OSGi system context as an MC bean
+ // Preregister some beans
try
{
- AbstractControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
- ControllerContext ctrlContext = new AbstractControllerContext(BEAN_SYSTEM_BUNDLE_CONTEXT, actions, null, context);
- kernel.getController().install(ctrlContext);
+ Kernel kernel = getKernel();
+ KernelController controller = kernel.getController();
+ ControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
+ controller.install(new AbstractControllerContext(BEAN_SYSTEM_BUNDLE_CONTEXT, actions, null, context));
+ controller.install(new AbstractControllerContext(BEAN_KERNEL, actions, null, kernel));
}
catch (RuntimeException rte)
{
@@ -66,20 +70,20 @@
}
catch (Throwable ex)
{
- throw new IllegalStateException("Cannot register: " + BEAN_SYSTEM_BUNDLE_CONTEXT, ex);
+ throw new IllegalStateException("Cannot register MC bean", ex);
}
}
public Kernel getKernel()
{
- return kernel;
+ return deployer.getKernel();
}
public List<String> getRegisteredBeans()
{
List<String> names = new ArrayList<String>();
- AbstractController controller = (AbstractController)kernel.getController();
+ AbstractController controller = (AbstractController)getKernel().getController();
for (ControllerContext ctx : controller.getAllContexts())
names.add(ctx.getName().toString());
@@ -88,7 +92,35 @@
public Object getRegisteredBean(String beanName)
{
- ControllerContext context = kernel.getController().getInstalledContext(beanName);
+ ControllerContext context = getKernel().getController().getInstalledContext(beanName);
return context != null ? context.getTarget() : null;
}
+
+ public void deploy(URL url)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ deployer.deploy(url);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void undeploy(URL url)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ deployer.undeploy(url);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/bundle/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-04-28 03:47:49 UTC (rev 87916)
@@ -23,9 +23,19 @@
//$Id$
+import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_MBEAN_SERVER;
+import static org.jboss.osgi.microcontainer.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
+
+import java.util.HashMap;
+
import javax.management.MBeanServer;
import javax.management.StandardMBean;
+import org.jboss.dependency.plugins.AbstractControllerContext;
+import org.jboss.dependency.plugins.AbstractControllerContextActions;
+import org.jboss.dependency.plugins.action.ControllerContextAction;
+import org.jboss.dependency.spi.ControllerContextActions;
+import org.jboss.dependency.spi.ControllerState;
import org.jboss.osgi.common.log.LogServiceTracker;
import org.jboss.osgi.microcontainer.MicrocontainerService;
import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
@@ -53,20 +63,31 @@
log = new LogServiceTracker(context);
// Register the MicrocontainerService as OSGi service
- MicrocontainerService mcService = registerOSGiService(context);
+ MicrocontainerServiceImpl mcService = registerOSGiService(context);
// Track the MBeanServer to register the MicrocontainerServiceMBean
- mbeanServerTracker = new MBeanServerTracker(context, (MicrocontainerServiceMBean)mcService);
+ mbeanServerTracker = new MBeanServerTracker(context, mcService);
mbeanServerTracker.open();
}
- private MicrocontainerService registerOSGiService(BundleContext context)
+ public void stop(BundleContext context)
{
+ if (registration != null)
+ {
+ log.log(LogService.LOG_DEBUG, "Unregister MicrocontainerService");
+ registration.unregister();
+ unregisterMBean(context);
+ registration = null;
+ }
+ }
+
+ private MicrocontainerServiceImpl registerOSGiService(BundleContext context)
+ {
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- MicrocontainerService service = new MicrocontainerServiceImpl(context);
+ MicrocontainerServiceImpl service = new MicrocontainerServiceImpl(context);
log.log(LogService.LOG_DEBUG, "Register MicrocontainerService");
registration = context.registerService(MicrocontainerService.class.getName(), service, null);
@@ -81,12 +102,12 @@
private void unregisterMBean(BundleContext context)
{
MBeanServer server = (MBeanServer)mbeanServerTracker.getService();
- if (server != null)
+ if (server != null && server.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
{
try
{
log.log(LogService.LOG_DEBUG, "Unregister MicrocontainerServiceMBean");
- server.unregisterMBean(MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE);
+ server.unregisterMBean(MBEAN_MICROCONTAINER_SERVICE);
}
catch (Exception ex)
{
@@ -95,22 +116,11 @@
}
}
- public void stop(BundleContext context)
- {
- if (registration != null)
- {
- log.log(LogService.LOG_DEBUG, "Unregister MicrocontainerService");
- registration.unregister();
- unregisterMBean(context);
- registration = null;
- }
- }
-
class MBeanServerTracker extends ServiceTracker
{
- private MicrocontainerServiceMBean mcService;
+ private MicrocontainerServiceImpl mcService;
- public MBeanServerTracker(BundleContext context, MicrocontainerServiceMBean mcService)
+ public MBeanServerTracker(BundleContext context, MicrocontainerServiceImpl mcService)
{
super(context, MBeanServer.class.getName(), null);
this.mcService = mcService;
@@ -119,23 +129,53 @@
public Object addingService(ServiceReference reference)
{
MBeanServer server = (MBeanServer)super.addingService(reference);
+
+ // Register the MicrocontainerServiceMBean
try
{
log.log(LogService.LOG_DEBUG, "Register MicrocontainerServiceMBean");
StandardMBean mbean = new StandardMBean(mcService, MicrocontainerServiceMBean.class);
- server.registerMBean(mbean, MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE);
+ server.registerMBean(mbean, MBEAN_MICROCONTAINER_SERVICE);
}
catch (Exception ex)
{
throw new IllegalStateException("Cannot register MicrocontainerServiceMBean", ex);
}
+
+ // Install the MBeanServer with the Kernel
+ try
+ {
+ ControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
+ mcService.getKernel().getController().install(new AbstractControllerContext(BEAN_MBEAN_SERVER, actions, null, server));
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Throwable ex)
+ {
+ throw new IllegalStateException("Cannot register MC bean", ex);
+ }
+
return server;
}
@Override
public void removedService(ServiceReference reference, Object service)
{
- unregisterMBean(context);
+ // Uninstall the MBeanServer from the Kernel
+ try
+ {
+ mcService.getKernel().getController().uninstall(BEAN_MBEAN_SERVER);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Throwable ex)
+ {
+ throw new IllegalStateException("Cannot register MC bean", ex);
+ }
super.removedService(reference, service);
}
}
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-example-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-example-jars.xml 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-example-jars.xml 2009-04-28 03:47:49 UTC (rev 87916)
@@ -42,12 +42,12 @@
<!-- Please add alphabetically -->
+ <!-- example/http -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-http.jar" files="${tests.resources.dir}/example/http/example-http.bnd" />
+
<!-- example/log -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-log.jar" files="${tests.resources.dir}/example/log/example-log.bnd" />
- <!-- example/http -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-http.jar" files="${tests.resources.dir}/example/http/example-http.bnd" />
-
<!-- example/microcontainer -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-microcontainer.jar" files="${tests.resources.dir}/example/microcontainer/example-microcontainer.bnd" />
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-04-28 03:36:16 UTC (rev 87915)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-04-28 03:47:49 UTC (rev 87916)
@@ -78,7 +78,7 @@
<!-- jbosgi41 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
- <!-- startlevel-service -->
+ <!-- service-startlevel -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/service-startlevel.jar" files="${tests.resources.dir}/service/startlevel/service-startlevel.bnd" />
<!-- Please add alphabetically -->
16 years, 8 months