JBoss-OSGI SVN: r95394 - in projects/jboss-osgi: projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util and 4 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-22 08:13:40 -0400 (Thu, 22 Oct 2009)
New Revision: 95394
Modified:
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
projects/jboss-osgi/trunk/reactor/deployment/pom.xml
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
projects/jboss-osgi/trunk/reactor/testing/pom.xml
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
Log:
Use DeployerService from testing
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-22 12:13:40 UTC (rev 95394)
@@ -23,17 +23,8 @@
//$Id$
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.spi.framework.BundleContextWrapper;
-import org.jboss.osgi.spi.util.BundleInfo;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,64 +40,9 @@
{
// Provide logging
final Logger log = LoggerFactory.getLogger(FelixBundleContextWrapper.class);
-
+
public FelixBundleContextWrapper(BundleContext context)
{
super(context);
}
-
- @Override
- public Bundle installBundle(String location) throws BundleException
- {
- URL url;
- try
- {
- url = new URL(location);
- }
- catch (MalformedURLException ex)
- {
- throw new IllegalArgumentException("Invalid bundle location: " + location);
- }
-
- BundleInfo info = BundleInfo.createBundleInfo(url);
- String symbolicName = info.getSymbolicName();
- Version version = Version.parseVersion(info.getVersion());
-
- Bundle bundle;
-
- ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
- if (sref != null)
- {
- DeployerService service = (DeployerService)context.getService(sref);
- service.deploy(url);
- bundle = getBundle(symbolicName, version, true);
- }
- else
- {
- bundle = context.installBundle(location);
- }
-
- return bundle;
- }
-
- private Bundle getBundle(String symbolicName, Version version, boolean mustExist)
- {
- Bundle bundle = null;
- for (Bundle aux : getBundles())
- {
- if (aux.getSymbolicName().equals(symbolicName))
- {
- if (version == null || version.equals(aux.getVersion()))
- {
- bundle = aux;
- break;
- }
- }
- }
-
- if (bundle == null && mustExist == true)
- throw new IllegalStateException("Cannot obtain bundle: " + symbolicName + "-" + version);
-
- return bundle;
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-10-22 12:13:40 UTC (rev 95394)
@@ -34,6 +34,7 @@
import org.jboss.virtual.VFSUtils;
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
/**
* An abstraction of a bundle
@@ -47,7 +48,7 @@
private String location;
private Manifest manifest;
private String symbolicName;
- private String version;
+ private Version version;
public static BundleInfo createBundleInfo(String location)
{
@@ -154,9 +155,8 @@
if (symbolicName == null)
throw new IllegalArgumentException("Cannot obtain Bundle-SymbolicName for: " + root);
- version = getManifestHeader(Constants.BUNDLE_VERSION);
- if (version == null)
- version = "0.0.0";
+ String versionStr = getManifestHeader(Constants.BUNDLE_VERSION);
+ version = Version.parseVersion(versionStr);
}
/**
@@ -196,7 +196,7 @@
/**
* Get the bundle version
*/
- public String getVersion()
+ public Version getVersion()
{
return version;
}
Modified: projects/jboss-osgi/trunk/reactor/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-22 12:13:40 UTC (rev 95394)
@@ -59,8 +59,8 @@
<!-- Test Dependecies -->
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-testing</artifactId>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-10-22 12:13:40 UTC (rev 95394)
@@ -92,7 +92,7 @@
*/
public String getVersion()
{
- return info.getVersion();
+ return info.getVersion().toString();
}
/**
Modified: projects/jboss-osgi/trunk/reactor/testing/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/pom.xml 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/trunk/reactor/testing/pom.xml 2009-10-22 12:13:40 UTC (rev 95394)
@@ -40,6 +40,10 @@
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
Modified: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 12:07:39 UTC (rev 95393)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 12:13:40 UTC (rev 95394)
@@ -33,6 +33,7 @@
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerFactory;
+import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.jboss.osgi.spi.testing.OSGiBundle;
@@ -40,11 +41,13 @@
import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiServiceReference;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.osgi.spi.util.BundleInfo;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Version;
import org.osgi.framework.launch.Framework;
import org.osgi.service.packageadmin.PackageAdmin;
@@ -64,11 +67,25 @@
public OSGiBundle installBundle(String location) throws BundleException
{
URL url = getTestHelper().getTestArchiveURL(location);
+ BundleInfo info = BundleInfo.createBundleInfo(url);
+ String symbolicName = info.getSymbolicName();
+ Version version = info.getVersion();
+ OSGiBundle bundle;
+
BundleContext context = getBundleContext();
- Bundle auxBundle = context.installBundle(url.toExternalForm());
- OSGiBundle bundle = new EmbeddedBundle(this, auxBundle);
-
+ ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ if (sref != null)
+ {
+ DeployerService service = (DeployerService)context.getService(sref);
+ service.deploy(url);
+ bundle = getBundle(symbolicName, version, true);
+ }
+ else
+ {
+ Bundle auxBundle = context.installBundle(url.toExternalForm());
+ bundle = new EmbeddedBundle(this, auxBundle);
+ }
return registerBundle(location, bundle);
}
16 years, 2 months
JBoss-OSGI SVN: r95391 - in projects/jboss-osgi: projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp and 19 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-22 07:39:22 -0400 (Thu, 22 Oct 2009)
New Revision: 95391
Added:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java
projects/jboss-osgi/trunk/reactor/testing/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
Removed:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/logging/
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/FrameworkException.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/NotImplementedException.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/OSGiConstants.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/capability/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/framework/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/internal/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/logging/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/management/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/package.html
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/service/
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/util/
Modified:
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java
projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
projects/jboss-osgi/projects/spi/trunk/pom.xml
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/CompendiumCapability.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/ConfigAdminCapability.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/LogServiceCapability.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/reactor/deployment/pom.xml
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
projects/jboss-osgi/trunk/reactor/framework/pom.xml
projects/jboss-osgi/trunk/reactor/pom.xml
projects/jboss-osgi/trunk/reactor/testing/pom.xml
projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedBundle.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
Log:
Separate testing from spi
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -26,7 +26,6 @@
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.capability.CompendiumCapability;
import org.jboss.osgi.spi.service.MicrocontainerService;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
* Adds the Microcontainer capability to the {@link OSGiRuntime}
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -25,7 +25,6 @@
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.capability.HttpServiceCapability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
* Adds the WebApp (WAR) capability to the {@link OSGiRuntime}
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -41,6 +41,7 @@
<version.eclipse.equinox>3.5</version.eclipse.equinox>
<version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
+ <version.jboss.osgi.testing>0.0.1-SNAPSHOT</version.jboss.osgi.testing>
</properties>
<!-- Dependencies -->
@@ -66,7 +67,14 @@
<artifactId>org.eclipse.osgi.services</artifactId>
<version>${version.eclipse.equinox}</version>
</dependency>
+
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ <version>${version.jboss.osgi.testing}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -40,6 +40,7 @@
<version.felix.framework>2.0.1</version.felix.framework>
<version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
+ <version.jboss.osgi.testing>0.0.1-SNAPSHOT</version.jboss.osgi.testing>
</properties>
<!-- Dependencies -->
@@ -60,7 +61,14 @@
<artifactId>org.apache.felix.framework</artifactId>
<version>${version.felix.framework}</version>
</dependency>
+
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ <version>${version.jboss.osgi.testing}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
Modified: projects/jboss-osgi/projects/spi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -61,11 +61,6 @@
<artifactId>jboss-vfs</artifactId>
<version>${version.jboss.vfs}</version>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${version.junit}</version>
- </dependency>
<!-- Provided Dependencies -->
<dependency>
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/Capability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -29,8 +29,6 @@
import java.util.List;
import java.util.Map;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-
/**
* An abstract OSGi capability that can be installed in an {@link OSGiRuntime}.
*
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/CompendiumCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/CompendiumCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/CompendiumCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -23,11 +23,9 @@
//$Id$
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.OSGiTestHelper;
/**
- * Adds the OSGi compedium capability to the {@link OSGiRuntime}
+ * Adds the OSGi compedium capability to the OSGiRuntime
* under test.
*
* Installed bundle: org.osgi.compendium.jar
@@ -41,7 +39,7 @@
{
super(null);
- if (new OSGiTestHelper().isFrameworkEquinox())
+ if ("equinox".equals(System.getProperty("framework")))
addBundle("bundles/org.eclipse.osgi.services.jar");
else
addBundle("bundles/org.osgi.compendium.jar");
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/ConfigAdminCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/ConfigAdminCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/ConfigAdminCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -23,7 +23,6 @@
//$Id$
-import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.osgi.service.cm.ConfigurationAdmin;
/**
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -23,7 +23,6 @@
//$Id$
-import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.osgi.service.http.HttpService;
/**
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/LogServiceCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/LogServiceCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/LogServiceCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -21,7 +21,6 @@
*/
package org.jboss.osgi.spi.capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.osgi.service.log.LogService;
/**
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -30,7 +30,7 @@
import java.util.Map;
import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
+import org.jboss.osgi.spi.util.ExportedPackageHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -40,7 +40,7 @@
import org.jboss.osgi.spi.FrameworkException;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.osgi.spi.internal.StringPropertyReplacer;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
+import org.jboss.osgi.spi.util.ExportedPackageHelper;
import org.jboss.osgi.spi.util.ServiceLoader;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java (from rev 95382, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/logging/ExportedPackageHelper.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -0,0 +1,90 @@
+/*
+ * 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.spi.util;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.ExportedPackage;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A helper the logs the exported packages for a bundle.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Apr-2009
+ */
+public final class ExportedPackageHelper
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(ExportedPackageHelper.class);
+
+ private PackageAdmin packageAdmin;
+
+ public ExportedPackageHelper(BundleContext context)
+ {
+ ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
+ if (sref != null)
+ packageAdmin = (PackageAdmin)context.getService(sref);
+ }
+
+ public boolean resolveBundle(Bundle bundle)
+ {
+ return packageAdmin != null ? packageAdmin.resolveBundles(new Bundle[] { bundle }) : false;
+ }
+
+ public boolean resolveBundles(Bundle[] bundles)
+ {
+ return packageAdmin != null ? packageAdmin.resolveBundles(bundles) : false;
+ }
+
+ /*
+ * * Log the list of exported packages
+ */
+ public void logExportedPackages(Bundle bundle)
+ {
+ if (packageAdmin != null)
+ {
+ log.debug("Exported-Packages: " + bundle.getSymbolicName());
+
+ ExportedPackage[] exportedPackages = packageAdmin.getExportedPackages(bundle);
+ if (exportedPackages != null)
+ {
+ List<String> packages = new ArrayList<String>();
+ for (ExportedPackage exp : exportedPackages)
+ packages.add(" " + exp.getName() + ";version=" + exp.getVersion());
+
+ Collections.sort(packages);
+ for (String exp : packages)
+ log.debug(exp);
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -67,6 +67,7 @@
<version.jboss.osgi.runtime.felix>2.0.1-SNAPSHOT</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.2-SNAPSHOT</version.jboss.osgi.runtime.jbossas>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
+ <version.jboss.osgi.testing>0.0.1-SNAPSHOT</version.jboss.osgi.testing>
<version.jboss.osgi.webapp>0.7.1-SNAPSHOT</version.jboss.osgi.webapp>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
<version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
@@ -95,6 +96,11 @@
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ <version>${version.jboss.osgi.testing}</version>
+ </dependency>
<!-- jboss.osgi.bundles -->
<dependency>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -26,7 +26,6 @@
import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
* Adds the Blueprint capability to the {@link OSGiRuntime}
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -43,12 +43,16 @@
<artifactId>bnd</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-blueprint</artifactId>
- <version>${version}</version>
<scope>provided</scope>
</dependency>
-
+
<!-- Bundle Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
Modified: projects/jboss-osgi/trunk/reactor/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -59,6 +59,11 @@
<!-- Test Dependecies -->
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -38,8 +38,8 @@
import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.deployment.deployer.AbstractDeployerService;
import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
import org.jboss.osgi.spi.management.ManagedBundleService;
+import org.jboss.osgi.spi.util.ExportedPackageHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
Modified: projects/jboss-osgi/trunk/reactor/framework/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -135,6 +135,10 @@
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-testing</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-deployers</artifactId>
</dependency>
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -44,6 +44,7 @@
<modules>
<module>deployment</module>
+ <module>testing</module>
<module>framework</module>
<module>blueprint</module>
</modules>
Copied: projects/jboss-osgi/trunk/reactor/testing (from rev 95382, projects/jboss-osgi/projects/spi/trunk)
Modified: projects/jboss-osgi/trunk/reactor/testing/pom.xml
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/pom.xml 2009-10-22 11:39:22 UTC (rev 95391)
@@ -14,70 +14,45 @@
<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 SPI</name>
+ <name>JBossOSGi Testing</name>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
+ <artifactId>jboss-osgi-testing</artifactId>
<packaging>jar</packaging>
- <version>1.0.3-SNAPSHOT</version>
+ <version>0.0.1-SNAPSHOT</version>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.4-SNAPSHOT</version>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Beta5</version>
</parent>
- <!-- Subversion -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projec...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
- </scm>
-
<!-- Properties -->
<properties>
- <version.args4j>2.0.12</version.args4j>
- <version.jboss.vfs>2.1.3.SP1</version.jboss.vfs>
- <version.osgi>4.2.0</version.osgi>
</properties>
<!-- Dependencies -->
<dependencies>
-
- <!-- Compile Dependencies -->
<dependency>
- <groupId>args4j</groupId>
- <artifactId>args4j</artifactId>
- <version>${version.args4j}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-vfs</artifactId>
- <version>${version.jboss.vfs}</version>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>${version.junit}</version>
</dependency>
<!-- Provided Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>${version.osgi}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
- <version>${version.osgi}</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -111,26 +86,4 @@
</plugins>
</build>
- <!-- Repositories -->
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <url>http://snapshots.jboss.org/maven2/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
</project>
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/FrameworkException.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/FrameworkException.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,49 +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.osgi.spi;
-
-// $Id$
-
-/**
- * An OSGi Framework Exception that should be thrown on unrecoverable errors.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 18-Jan-2009
- */
-@SuppressWarnings("serial")
-public class FrameworkException extends RuntimeException
-{
- public FrameworkException(String message)
- {
- super(message);
- }
-
- public FrameworkException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public FrameworkException(Throwable cause)
- {
- super(cause);
- }
-}
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/NotImplementedException.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/NotImplementedException.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/NotImplementedException.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,48 +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.osgi.spi;
-
-// $Id$
-
-/**
- * A RuntimeException that should be thrown for unimplemented features
- *
- * @author thomas.diesler(a)jboss.com
- * @since 18-Jun-2008
- */
-@SuppressWarnings("serial")
-public class NotImplementedException extends RuntimeException
-{
- public NotImplementedException()
- {
- }
-
- public NotImplementedException(String message)
- {
- super(message);
- }
-
- public NotImplementedException(String jiraIssue, String message)
- {
- super("[" + jiraIssue + "] " + message);
- }
-}
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/OSGiConstants.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/OSGiConstants.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/OSGiConstants.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,74 +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.osgi.spi;
-
-//$Id$
-
-/**
- * JBossOSGi Constants
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public interface OSGiConstants
-{
- /** The JBossOSGi domain 'jboss.osgi' */
- String DOMAIN_NAME = "jboss.osgi";
-
- /**
- * If set to 'true' bundles can be deployed in any order. Deployed bundle will get started when their dependencies can be resolved.
- * If set to 'false' bundles must be deployed in the order that is required to start them.
- *
- * The default is 'true'
- */
- String PROPERTY_DEFERRED_START = "org.jboss.osgi.deferred.start";
-
- /**
- * If set to 'true' bundles are started automatically.
- *
- * The default is 'false'
- */
- String PROPERTY_AUTO_START = "org.jboss.osgi.auto.start";
-
- /**
- * Specifies the start level for a bundle.
- *
- * The default is '0'
- */
- String PROPERTY_START_LEVEL = "org.jboss.osgi.start.level";
-
- /**
- * The JBossOSGi runtime system property that denotes the path to the runtime
- */
- String OSGI_HOME = "osgi.home";
-
- /**
- * The JBossOSGi runtime system property that denotes the path to the active runtime profile
- */
- String OSGI_SERVER_HOME = "osgi.server.home";
-
- /**
- * A JBossOSGi deployment unit attachment key that containe the bundle's symbolic name.
- */
- String KEY_BUNDLE_SYMBOLIC_NAME = "org.jboss.osgi.bundle.symbolic.name";
-
-}
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/package.html
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/package.html 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/package.html 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,5 +0,0 @@
-<html>
-<body>
-Common classes and interfaces.
-</body>
-</html>
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,235 +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.osgi.spi.testing;
-
-import java.io.File;
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.virtual.VFS;
-import org.junit.After;
-import org.junit.Before;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An abstract OSGi Test.
- *
- * {@link OSGiTest} is a convenience wrapper for the functionality provided
- * by {@link OSGiTestHelper}.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Sep-2008
- */
-public abstract class OSGiTest
-{
- // Provide logging
- final Logger log = LoggerFactory.getLogger(OSGiTest.class);
-
- private OSGiTestHelper helper;
-
- protected OSGiTest()
- {
- // Prevent unknown protocol: vfsfile
- VFS.init();
- }
-
- /**
- * Get the test helper used by this test
- *
- * Overwrite if you need to supply another helper
- * i.e. one that you have statically setup
- */
- protected OSGiTestHelper getTestHelper()
- {
- if (helper == null)
- helper = new OSGiTestHelper();
-
- return helper;
- }
-
- /**
- * Writes a a debug start messge
- */
- @Before
- public void setUp() throws Exception
- {
- log.debug("### START " + getLongName());
- }
-
- /**
- * Writes a a debug stop messge
- */
- @After
- public void tearDown() throws Exception
- {
- log.debug("### END " + getLongName());
- }
-
- /**
- * Get the last token in the FQN of this test class.
- */
- protected String getShortName()
- {
- String shortName = getClass().getName();
- shortName = shortName.substring(shortName.lastIndexOf(".") + 1);
- return shortName;
- }
-
- /**
- * Get the the FQN of this test class.
- */
- protected String getLongName()
- {
- return getClass().getName();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getDefaultRuntime()}
- */
- protected OSGiRuntime getDefaultRuntime()
- {
- return getTestHelper().getDefaultRuntime();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getEmbeddedRuntime()}
- */
- protected OSGiRuntime getEmbeddedRuntime()
- {
- return getTestHelper().getEmbeddedRuntime();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getRemoteRuntime()}
- */
- public OSGiRuntime getRemoteRuntime()
- {
- return getTestHelper().getRemoteRuntime();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getResourceURL(String)}
- */
- protected URL getResourceURL(String resource)
- {
- return getTestHelper().getResourceURL(resource);
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getResourceFile(String)}
- */
- protected File getResourceFile(String resource)
- {
- return getTestHelper().getResourceFile(resource);
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getTestArchiveURL(String)}
- */
- protected URL getTestArchiveURL(String archive)
- {
- return getTestHelper().getTestArchiveURL(archive);
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getTestArchivePath(String)}
- */
- protected String getTestArchivePath(String archive)
- {
- return getTestHelper().getTestArchivePath(archive);
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getTestArchiveFile(String)}
- */
- protected File getTestArchiveFile(String archive)
- {
- return getTestHelper().getTestArchiveFile(archive);
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getInitialContext()}
- */
- public InitialContext getInitialContext() throws NamingException
- {
- return getTestHelper().getInitialContext();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getJndiPort()}
- */
- public Integer getJndiPort()
- {
- return getTestHelper().getJndiPort();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getServerHost()}
- */
- public String getServerHost()
- {
- return getTestHelper().getServerHost();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getTargetContainer()}
- */
- public String getTargetContainer()
- {
- return getTestHelper().getTargetContainer();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#getFramework()}
- */
- public String getFramework()
- {
- return getTestHelper().getFramework();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#isFrameworkEquinox()}
- */
- public boolean isFrameworkEquinox()
- {
- return getTestHelper().isFrameworkEquinox();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#isFrameworkFelix()}
- */
- public boolean isFrameworkFelix()
- {
- return getTestHelper().isFrameworkFelix();
- }
-
- /**
- * Delegates to {@link OSGiTestHelper#isFrameworkJBossMC()}
- */
- public boolean isFrameworkJBossMC()
- {
- return getTestHelper().isFrameworkJBossMC();
- }
-}
Copied: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java (from rev 95389, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -0,0 +1,235 @@
+/*
+ * 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.spi.testing;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.virtual.VFS;
+import org.junit.After;
+import org.junit.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An abstract OSGi Test.
+ *
+ * {@link OSGiTest} is a convenience wrapper for the functionality provided
+ * by {@link OSGiTestHelper}.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Sep-2008
+ */
+public abstract class OSGiTest
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(OSGiTest.class);
+
+ private OSGiTestHelper helper;
+
+ protected OSGiTest()
+ {
+ // Prevent unknown protocol: vfsfile
+ VFS.init();
+ }
+
+ /**
+ * Get the test helper used by this test
+ *
+ * Overwrite if you need to supply another helper
+ * i.e. one that you have statically setup
+ */
+ protected OSGiTestHelper getTestHelper()
+ {
+ if (helper == null)
+ helper = new OSGiTestHelper();
+
+ return helper;
+ }
+
+ /**
+ * Writes a a debug start messge
+ */
+ @Before
+ public void setUp() throws Exception
+ {
+ log.debug("### START " + getLongName());
+ }
+
+ /**
+ * Writes a a debug stop messge
+ */
+ @After
+ public void tearDown() throws Exception
+ {
+ log.debug("### END " + getLongName());
+ }
+
+ /**
+ * Get the last token in the FQN of this test class.
+ */
+ protected String getShortName()
+ {
+ String shortName = getClass().getName();
+ shortName = shortName.substring(shortName.lastIndexOf(".") + 1);
+ return shortName;
+ }
+
+ /**
+ * Get the the FQN of this test class.
+ */
+ protected String getLongName()
+ {
+ return getClass().getName();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getDefaultRuntime()}
+ */
+ protected OSGiRuntime getDefaultRuntime()
+ {
+ return getTestHelper().getDefaultRuntime();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getEmbeddedRuntime()}
+ */
+ protected OSGiRuntime getEmbeddedRuntime()
+ {
+ return getTestHelper().getEmbeddedRuntime();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getRemoteRuntime()}
+ */
+ public OSGiRuntime getRemoteRuntime()
+ {
+ return getTestHelper().getRemoteRuntime();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getResourceURL(String)}
+ */
+ protected URL getResourceURL(String resource)
+ {
+ return getTestHelper().getResourceURL(resource);
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getResourceFile(String)}
+ */
+ protected File getResourceFile(String resource)
+ {
+ return getTestHelper().getResourceFile(resource);
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getTestArchiveURL(String)}
+ */
+ protected URL getTestArchiveURL(String archive)
+ {
+ return getTestHelper().getTestArchiveURL(archive);
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getTestArchivePath(String)}
+ */
+ protected String getTestArchivePath(String archive)
+ {
+ return getTestHelper().getTestArchivePath(archive);
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getTestArchiveFile(String)}
+ */
+ protected File getTestArchiveFile(String archive)
+ {
+ return getTestHelper().getTestArchiveFile(archive);
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getInitialContext()}
+ */
+ public InitialContext getInitialContext() throws NamingException
+ {
+ return getTestHelper().getInitialContext();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getJndiPort()}
+ */
+ public Integer getJndiPort()
+ {
+ return getTestHelper().getJndiPort();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getServerHost()}
+ */
+ public String getServerHost()
+ {
+ return getTestHelper().getServerHost();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getTargetContainer()}
+ */
+ public String getTargetContainer()
+ {
+ return getTestHelper().getTargetContainer();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#getFramework()}
+ */
+ public String getFramework()
+ {
+ return getTestHelper().getFramework();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#isFrameworkEquinox()}
+ */
+ public boolean isFrameworkEquinox()
+ {
+ return getTestHelper().isFrameworkEquinox();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#isFrameworkFelix()}
+ */
+ public boolean isFrameworkFelix()
+ {
+ return getTestHelper().isFrameworkFelix();
+ }
+
+ /**
+ * Delegates to {@link OSGiTestHelper#isFrameworkJBossMC()}
+ */
+ public boolean isFrameworkJBossMC()
+ {
+ return getTestHelper().isFrameworkJBossMC();
+ }
+}
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,215 +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.osgi.spi.testing;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.testing.internal.EmbeddedRuntime;
-import org.jboss.osgi.spi.testing.internal.RemoteRuntime;
-
-/**
- * An OSGi Test Helper
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Sep-2008
- */
-public class OSGiTestHelper
-{
- private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
- private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
-
- // The OSGiBootstrapProvider is a lazy property of the helper
- private OSGiBootstrapProvider bootProvider;
- private boolean skipCreateBootstrapProvider;
-
- private static String testResourcesDir;
- private static String testArchiveDir;
-
- public OSGiTestHelper()
- {
- testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-classes");
- testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY, "target/test-libs");
- }
-
- public OSGiBootstrapProvider getBootstrapProvider()
- {
- if (bootProvider == null && skipCreateBootstrapProvider == false)
- {
- try
- {
- bootProvider = OSGiBootstrap.getBootstrapProvider();
- }
- catch (RuntimeException rte)
- {
- skipCreateBootstrapProvider = true;
- throw rte;
- }
- }
- return bootProvider;
- }
-
- public OSGiRuntime getDefaultRuntime()
- {
- OSGiRuntime runtime;
-
- String target = System.getProperty("target.container");
- if (target == null)
- {
- runtime = getEmbeddedRuntime();
- }
- else
- {
- runtime = getRemoteRuntime();
- }
- return runtime;
- }
-
- public OSGiRuntime getEmbeddedRuntime()
- {
- return new EmbeddedRuntime(this);
- }
-
- public OSGiRuntime getRemoteRuntime()
- {
- return new RemoteRuntime(this);
- }
-
- /** Try to discover the URL for the test resource */
- public URL getResourceURL(String resource)
- {
- URL resURL = null;
- try
- {
- File resourceFile = getResourceFile(resource);
- resURL = resourceFile.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- return resURL;
- }
-
- /** Try to discover the File for the test resource */
- public File getResourceFile(String resource)
- {
- File file = new File(resource);
- if (file.exists())
- return file;
-
- file = new File(testResourcesDir + "/" + resource);
- if (file.exists())
- return file;
-
- throw new IllegalArgumentException("Cannot obtain '" + testResourcesDir + "/" + resource + "'");
- }
-
- /** Try to discover the URL for the deployment archive */
- public URL getTestArchiveURL(String archive)
- {
- try
- {
- return getTestArchiveFile(archive).toURL();
- }
- catch (MalformedURLException ex)
- {
- throw new IllegalStateException(ex);
- }
- }
-
- /** Try to discover the absolute path for the deployment archive */
- public String getTestArchivePath(String archive)
- {
- return getTestArchiveFile(archive).getAbsolutePath();
- }
-
- /** Try to discover the File for the deployment archive */
- public File getTestArchiveFile(String archive)
- {
- File file = new File(archive);
- if (file.exists())
- return file;
-
- file = new File(testArchiveDir + "/" + archive);
- if (file.exists())
- return file;
-
- throw new IllegalArgumentException("Cannot obtain '" + testArchiveDir + "/" + archive + "'.");
- }
-
- @SuppressWarnings("unchecked")
- public InitialContext getInitialContext() throws NamingException
- {
- Hashtable env = new Hashtable();
- env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- env.put("java.naming.provider.url", "jnp://" + getServerHost() + ":" + getJndiPort());
- return new InitialContext(env);
- }
-
- public Integer getJndiPort()
- {
- String port = System.getProperty("jndi.server.port", "1099");
- return new Integer(port);
- }
-
- public String getServerHost()
- {
- String bindAddress = System.getProperty("jboss.bind.address", "localhost");
- return bindAddress;
- }
-
- public String getTargetContainer()
- {
- String targetContainer = System.getProperty("target.container");
- return targetContainer;
- }
-
- public String getFramework()
- {
- String framework = System.getProperty("framework", "jbossmc");
- return framework;
- }
-
- public boolean isFrameworkEquinox()
- {
- return "equinox".equals(getFramework());
- }
-
- public boolean isFrameworkFelix()
- {
- return "felix".equals(getFramework());
- }
-
- public boolean isFrameworkJBossMC()
- {
- return "jbossmc".equals(getFramework());
- }
-}
Copied: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java (from rev 95389, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -0,0 +1,220 @@
+/*
+ * 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.spi.testing;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.testing.internal.EmbeddedRuntime;
+import org.jboss.osgi.spi.testing.internal.RemoteRuntime;
+
+/**
+ * An OSGi Test Helper
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Sep-2008
+ */
+public class OSGiTestHelper
+{
+ private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+ private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
+
+ // The OSGiBootstrapProvider is a lazy property of the helper
+ private OSGiBootstrapProvider bootProvider;
+ private boolean skipCreateBootstrapProvider;
+
+ private static String testResourcesDir;
+ private static String testArchiveDir;
+
+ public OSGiTestHelper()
+ {
+ testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-classes");
+ testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY, "target/test-libs");
+ }
+
+ public OSGiBootstrapProvider getBootstrapProvider()
+ {
+ if (bootProvider == null && skipCreateBootstrapProvider == false)
+ {
+ try
+ {
+ bootProvider = OSGiBootstrap.getBootstrapProvider();
+ }
+ catch (RuntimeException rte)
+ {
+ skipCreateBootstrapProvider = true;
+ throw rte;
+ }
+ }
+ return bootProvider;
+ }
+
+ public void ungetBootstrapProvider()
+ {
+ bootProvider = null;
+ }
+
+ public OSGiRuntime getDefaultRuntime()
+ {
+ OSGiRuntime runtime;
+
+ String target = System.getProperty("target.container");
+ if (target == null)
+ {
+ runtime = getEmbeddedRuntime();
+ }
+ else
+ {
+ runtime = getRemoteRuntime();
+ }
+ return runtime;
+ }
+
+ public OSGiRuntime getEmbeddedRuntime()
+ {
+ return new EmbeddedRuntime(this);
+ }
+
+ public OSGiRuntime getRemoteRuntime()
+ {
+ return new RemoteRuntime(this);
+ }
+
+ /** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource)
+ {
+ URL resURL = null;
+ try
+ {
+ File resourceFile = getResourceFile(resource);
+ resURL = resourceFile.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ return resURL;
+ }
+
+ /** Try to discover the File for the test resource */
+ public File getResourceFile(String resource)
+ {
+ File file = new File(resource);
+ if (file.exists())
+ return file;
+
+ file = new File(testResourcesDir + "/" + resource);
+ if (file.exists())
+ return file;
+
+ throw new IllegalArgumentException("Cannot obtain '" + testResourcesDir + "/" + resource + "'");
+ }
+
+ /** Try to discover the URL for the deployment archive */
+ public URL getTestArchiveURL(String archive)
+ {
+ try
+ {
+ return getTestArchiveFile(archive).toURL();
+ }
+ catch (MalformedURLException ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+ }
+
+ /** Try to discover the absolute path for the deployment archive */
+ public String getTestArchivePath(String archive)
+ {
+ return getTestArchiveFile(archive).getAbsolutePath();
+ }
+
+ /** Try to discover the File for the deployment archive */
+ public File getTestArchiveFile(String archive)
+ {
+ File file = new File(archive);
+ if (file.exists())
+ return file;
+
+ file = new File(testArchiveDir + "/" + archive);
+ if (file.exists())
+ return file;
+
+ throw new IllegalArgumentException("Cannot obtain '" + testArchiveDir + "/" + archive + "'.");
+ }
+
+ @SuppressWarnings("unchecked")
+ public InitialContext getInitialContext() throws NamingException
+ {
+ Hashtable env = new Hashtable();
+ env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ env.put("java.naming.provider.url", "jnp://" + getServerHost() + ":" + getJndiPort());
+ return new InitialContext(env);
+ }
+
+ public Integer getJndiPort()
+ {
+ String port = System.getProperty("jndi.server.port", "1099");
+ return new Integer(port);
+ }
+
+ public String getServerHost()
+ {
+ String bindAddress = System.getProperty("jboss.bind.address", "localhost");
+ return bindAddress;
+ }
+
+ public String getTargetContainer()
+ {
+ String targetContainer = System.getProperty("target.container");
+ return targetContainer;
+ }
+
+ public String getFramework()
+ {
+ String framework = System.getProperty("framework", "jbossmc");
+ return framework;
+ }
+
+ public boolean isFrameworkEquinox()
+ {
+ return "equinox".equals(getFramework());
+ }
+
+ public boolean isFrameworkFelix()
+ {
+ return "felix".equals(getFramework());
+ }
+
+ public boolean isFrameworkJBossMC()
+ {
+ return "jbossmc".equals(getFramework());
+ }
+}
Modified: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedBundle.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedBundle.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedBundle.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -23,8 +23,8 @@
import java.util.Dictionary;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
import org.jboss.osgi.spi.testing.OSGiBundle;
+import org.jboss.osgi.spi.util.ExportedPackageHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.Version;
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,199 +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.osgi.spi.testing.internal;
-
-// $Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerFactory;
-
-import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.testing.OSGiBundle;
-import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.OSGiServiceReference;
-import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.launch.Framework;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * An embedded implementation of the {@link OSGiRuntime}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Sep-2008
- */
-public class EmbeddedRuntime extends OSGiRuntimeImpl
-{
- public EmbeddedRuntime(OSGiTestHelper helper)
- {
- super(helper);
- }
-
- public OSGiBundle installBundle(String location) throws BundleException
- {
- URL url = getTestHelper().getTestArchiveURL(location);
-
- BundleContext context = getBundleContext();
- Bundle auxBundle = context.installBundle(url.toExternalForm());
- OSGiBundle bundle = new EmbeddedBundle(this, auxBundle);
-
- return registerBundle(location, bundle);
- }
-
- public OSGiBundle[] getBundles()
- {
- List<OSGiBundle> absBundles = new ArrayList<OSGiBundle>();
- for (Bundle bundle : getBundleContext().getBundles())
- {
- absBundles.add(new EmbeddedBundle(this, bundle));
- }
- OSGiBundle[] bundleArr = new OSGiBundle[absBundles.size()];
- absBundles.toArray(bundleArr);
- return bundleArr;
- }
-
- public OSGiBundle getBundle(long bundleId)
- {
- Bundle bundle = getBundleContext().getBundle(bundleId);
- return bundle != null ? new EmbeddedBundle(this, bundle) : null;
- }
-
- public OSGiServiceReference getServiceReference(String clazz)
- {
- ServiceReference sref = getBundleContext().getServiceReference(clazz);
- return (sref != null ? new EmbeddedServiceReference(sref) : null);
- }
-
- public OSGiServiceReference[] getServiceReferences(String clazz, String filter)
- {
- OSGiServiceReference[] retRefs = null;
-
- ServiceReference[] srefs;
- try
- {
- srefs = getBundleContext().getServiceReferences(clazz, filter);
- }
- catch (InvalidSyntaxException e)
- {
- throw new IllegalArgumentException("Invalid filter syntax: " + filter);
- }
-
- if (srefs != null)
- {
- retRefs = new OSGiServiceReference[srefs.length];
- for(int i=0; i < srefs.length; i++)
- retRefs[i] = new EmbeddedServiceReference(srefs[i]);
- }
- return retRefs;
- }
-
- @Override
- public void addCapability(Capability capability) throws BundleException
- {
- // Copy the properties to the System props
- Map<String, String> props = capability.getSystemProperties();
- for (Entry<String, String> entry : props.entrySet())
- {
- String value = System.getProperty(entry.getKey());
- if (value == null)
- System.setProperty(entry.getKey(), entry.getValue());
- }
-
- super.addCapability(capability);
- }
-
- @Override
- public void shutdown()
- {
- OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
- if (bootProvider != null)
- {
- super.shutdown();
- try
- {
- Framework framework = bootProvider.getFramework();
- framework.stop();
- framework.waitForStop(5000);
- }
- catch (Exception ex)
- {
- log.error("Cannot stop the framework", ex);
- }
- }
- }
-
- public BundleContext getBundleContext()
- {
- OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
- Framework framework = bootProvider.getFramework();
- if (framework.getState() != Bundle.ACTIVE)
- {
- try
- {
- framework.start();
- }
- catch (BundleException ex)
- {
- throw new IllegalStateException("Cannot start framework", ex);
- }
- }
- return framework.getBundleContext();
- }
-
- @SuppressWarnings("unchecked")
- public MBeanServerConnection getMBeanServer()
- {
- ArrayList<MBeanServer> serverArr = MBeanServerFactory.findMBeanServer(null);
- if (serverArr.size() > 1)
- throw new IllegalStateException("Multiple MBeanServer instances not supported");
-
- MBeanServer server = null;
- if (serverArr.size() == 1)
- server = serverArr.get(0);
-
- if (server == null)
- server = MBeanServerFactory.createMBeanServer();
-
- return server;
- }
-
- public OSGiPackageAdmin getPackageAdmin()
- {
- BundleContext context = getBundleContext();
- ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
- PackageAdmin packAdmin = (PackageAdmin)context.getService(sref);
- return new EmbeddedPackageAdmin(packAdmin);
- }
-}
Copied: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java (from rev 95389, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -0,0 +1,200 @@
+/*
+ * 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.spi.testing.internal;
+
+// $Id$
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerFactory;
+
+import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.testing.OSGiBundle;
+import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiServiceReference;
+import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.launch.Framework;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * An embedded implementation of the {@link OSGiRuntime}
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Sep-2008
+ */
+public class EmbeddedRuntime extends OSGiRuntimeImpl
+{
+ public EmbeddedRuntime(OSGiTestHelper helper)
+ {
+ super(helper);
+ }
+
+ public OSGiBundle installBundle(String location) throws BundleException
+ {
+ URL url = getTestHelper().getTestArchiveURL(location);
+
+ BundleContext context = getBundleContext();
+ Bundle auxBundle = context.installBundle(url.toExternalForm());
+ OSGiBundle bundle = new EmbeddedBundle(this, auxBundle);
+
+ return registerBundle(location, bundle);
+ }
+
+ public OSGiBundle[] getBundles()
+ {
+ List<OSGiBundle> absBundles = new ArrayList<OSGiBundle>();
+ for (Bundle bundle : getBundleContext().getBundles())
+ {
+ absBundles.add(new EmbeddedBundle(this, bundle));
+ }
+ OSGiBundle[] bundleArr = new OSGiBundle[absBundles.size()];
+ absBundles.toArray(bundleArr);
+ return bundleArr;
+ }
+
+ public OSGiBundle getBundle(long bundleId)
+ {
+ Bundle bundle = getBundleContext().getBundle(bundleId);
+ return bundle != null ? new EmbeddedBundle(this, bundle) : null;
+ }
+
+ public OSGiServiceReference getServiceReference(String clazz)
+ {
+ ServiceReference sref = getBundleContext().getServiceReference(clazz);
+ return (sref != null ? new EmbeddedServiceReference(sref) : null);
+ }
+
+ public OSGiServiceReference[] getServiceReferences(String clazz, String filter)
+ {
+ OSGiServiceReference[] retRefs = null;
+
+ ServiceReference[] srefs;
+ try
+ {
+ srefs = getBundleContext().getServiceReferences(clazz, filter);
+ }
+ catch (InvalidSyntaxException e)
+ {
+ throw new IllegalArgumentException("Invalid filter syntax: " + filter);
+ }
+
+ if (srefs != null)
+ {
+ retRefs = new OSGiServiceReference[srefs.length];
+ for(int i=0; i < srefs.length; i++)
+ retRefs[i] = new EmbeddedServiceReference(srefs[i]);
+ }
+ return retRefs;
+ }
+
+ @Override
+ public void addCapability(Capability capability) throws BundleException
+ {
+ // Copy the properties to the System props
+ Map<String, String> props = capability.getSystemProperties();
+ for (Entry<String, String> entry : props.entrySet())
+ {
+ String value = System.getProperty(entry.getKey());
+ if (value == null)
+ System.setProperty(entry.getKey(), entry.getValue());
+ }
+
+ super.addCapability(capability);
+ }
+
+ @Override
+ public void shutdown()
+ {
+ OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
+ if (bootProvider != null)
+ {
+ super.shutdown();
+ try
+ {
+ Framework framework = bootProvider.getFramework();
+ framework.stop();
+ framework.waitForStop(5000);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot stop the framework", ex);
+ }
+ getTestHelper().ungetBootstrapProvider();
+ }
+ }
+
+ public BundleContext getBundleContext()
+ {
+ OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
+ Framework framework = bootProvider.getFramework();
+ if (framework.getState() != Bundle.ACTIVE)
+ {
+ try
+ {
+ framework.start();
+ }
+ catch (BundleException ex)
+ {
+ throw new IllegalStateException("Cannot start framework", ex);
+ }
+ }
+ return framework.getBundleContext();
+ }
+
+ @SuppressWarnings("unchecked")
+ public MBeanServerConnection getMBeanServer()
+ {
+ ArrayList<MBeanServer> serverArr = MBeanServerFactory.findMBeanServer(null);
+ if (serverArr.size() > 1)
+ throw new IllegalStateException("Multiple MBeanServer instances not supported");
+
+ MBeanServer server = null;
+ if (serverArr.size() == 1)
+ server = serverArr.get(0);
+
+ if (server == null)
+ server = MBeanServerFactory.createMBeanServer();
+
+ return server;
+ }
+
+ public OSGiPackageAdmin getPackageAdmin()
+ {
+ BundleContext context = getBundleContext();
+ ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packAdmin = (PackageAdmin)context.getService(sref);
+ return new EmbeddedPackageAdmin(packAdmin);
+ }
+}
Deleted: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java 2009-10-22 06:54:15 UTC (rev 95382)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -1,297 +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.osgi.spi.testing.internal;
-
-// $Id$
-
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.management.MBeanProxy;
-import org.jboss.osgi.spi.management.MBeanProxyException;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
-import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
-import org.jboss.osgi.spi.management.ManagedServiceReference;
-import org.jboss.osgi.spi.testing.OSGiBundle;
-import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-import org.jboss.osgi.spi.testing.OSGiServiceReference;
-import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.osgi.spi.util.BundleInfo;
-import org.osgi.framework.BundleException;
-
-/**
- * A remote implementation of the {@link OSGiRuntime}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Sep-2008
- */
-public class RemoteRuntime extends OSGiRuntimeImpl
-{
- private MBeanServerConnection mbeanServer;
- private ManagedFrameworkMBean managedFramework;
-
- public RemoteRuntime(OSGiTestHelper helper)
- {
- super(helper);
- }
-
- public OSGiBundle installBundle(String location) throws BundleException
- {
- try
- {
- URL bundleURL = getTestHelper().getTestArchiveURL(location);
- BundleInfo bundleInfo = BundleInfo.createBundleInfo(bundleURL);
-
- deployInternal(location, true);
-
- String symbolicName = bundleInfo.getSymbolicName();
- String version = bundleInfo.getVersion().toString();
- ManagedBundleMBean bundleMBean = getRemoteFramework().getBundle(symbolicName, version);
- RemoteBundle bundle = new RemoteBundle(this, bundleMBean, location);
- return registerBundle(location, bundle);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (MBeanException ex)
- {
- Exception target = ex.getTargetException();
- if (target instanceof BundleException)
- throw (BundleException)target;
-
- throw new BundleException("Cannot install: " + location, target);
- }
- catch (Exception ex)
- {
- throw new BundleException("Cannot install: " + location, ex);
- }
- }
-
- public void deploy(String location) throws Exception
- {
- deployInternal(location, false);
- }
-
- private void deployInternal(String location, boolean isBundle) throws Exception
- {
- URL archiveURL = getTestHelper().getTestArchiveURL(location);
- if (isBundle)
- invokeDeployerService("deploy", archiveURL);
- else
- invokeMainDeployer("deploy", archiveURL);
- }
-
- public void undeploy(String location) throws Exception
- {
- URL archiveURL = getTestHelper().getTestArchiveURL(location);
- if (isBundleArchive(location))
- invokeDeployerService("undeploy", archiveURL);
- else
- invokeMainDeployer("undeploy", archiveURL);
- }
-
- private boolean isBundleArchive(String location)
- {
- try
- {
- URL archiveURL = getTestHelper().getTestArchiveURL(location);
- BundleInfo.createBundleInfo(archiveURL);
- return true;
- }
- catch (RuntimeException ex)
- {
- return false;
- }
- }
-
- public OSGiBundle[] getBundles()
- {
- try
- {
- Set<ManagedBundleMBean> remoteBundles = getRemoteFramework().getBundles();
- Set<OSGiBundle> bundles = new HashSet<OSGiBundle>();
- for (ManagedBundleMBean remoteBundle : remoteBundles)
- bundles.add(new RemoteBundle(this, remoteBundle, null));
-
- OSGiBundle[] bundleArr = new OSGiBundle[bundles.size()];
- bundles.toArray(bundleArr);
-
- return bundleArr;
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Cannot obtain remote bundles", ex);
- }
- }
-
- public OSGiBundle getBundle(long bundleId)
- {
- ManagedBundleMBean bundle = getRemoteFramework().getBundle(bundleId);
- return bundle != null ? new RemoteBundle(this, bundle, null) : null;
- }
-
- public OSGiServiceReference getServiceReference(String clazz)
- {
- ManagedServiceReference manref = getRemoteFramework().getServiceReference(clazz);
- return manref != null ? new RemoteServiceReference(manref) : null;
- }
-
- public OSGiServiceReference[] getServiceReferences(String clazz, String filter)
- {
- OSGiServiceReference[] srefs = null;
-
- ManagedServiceReference[] manrefs = getRemoteFramework().getServiceReferences(clazz, filter);
- if (manrefs != null)
- {
- srefs = new OSGiServiceReference[manrefs.length];
- for (int i = 0; i < manrefs.length; i++)
- srefs[i] = new RemoteServiceReference(manrefs[i]);
- }
-
- return srefs;
- }
-
- public MBeanServerConnection getMBeanServer()
- {
- if (mbeanServer == null)
- {
- try
- {
- InitialContext iniCtx = getInitialContext();
- mbeanServer = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
- }
- catch (NamingException ex)
- {
- throw new IllegalStateException("Cannot obtain MBeanServerConnection", ex);
- }
- }
- return mbeanServer;
- }
-
- public OSGiPackageAdmin getPackageAdmin()
- {
- return new RemotePackageAdmin(this);
- }
-
- @Override
- public void shutdown()
- {
- OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
- if (bootProvider != null)
- {
- super.shutdown();
- getPackageAdmin().refreshPackages(null);
- }
- }
-
- private RemoteFramework getRemoteFramework()
- {
- try
- {
- if (managedFramework == null)
- managedFramework = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, getMBeanServer());
- }
- catch (MBeanProxyException ex)
- {
- throw new RemoteFrameworkException(ex);
- }
-
- return new RemoteFramework()
- {
- public ManagedBundleMBean getBundle(String symbolicName, String version)
- {
- ObjectName oname = managedFramework.getBundle(symbolicName, version);
- if (oname == null)
- throw new IllegalArgumentException("Cannot get remote bundle for: " + symbolicName);
-
- try
- {
- return MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
- }
- catch (MBeanProxyException ex)
- {
- throw new RemoteFrameworkException(ex);
- }
- }
-
- public ManagedBundleMBean getBundle(long bundleId)
- {
- ObjectName oname = managedFramework.getBundle(bundleId);
- if (oname == null)
- throw new IllegalArgumentException("Cannot get remote bundle for: " + bundleId);
-
- try
- {
- return MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
- }
- catch (MBeanProxyException ex)
- {
- throw new RemoteFrameworkException(ex);
- }
- }
-
- public Set<ManagedBundleMBean> getBundles()
- {
- Set<ManagedBundleMBean> remBundles = new HashSet<ManagedBundleMBean>();
- for (ObjectName bundleOName : managedFramework.getBundles())
- {
- try
- {
- ManagedBundleMBean remBundle = MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getMBeanServer());
- remBundles.add(remBundle);
- }
- catch (MBeanProxyException ex)
- {
- throw new RemoteFrameworkException(ex);
- }
- }
- return remBundles;
- }
-
- public ManagedServiceReference getServiceReference(String clazz)
- {
- return managedFramework.getServiceReference(clazz);
- }
-
- public ManagedServiceReference[] getServiceReferences(String clazz, String filter)
- {
- return managedFramework.getServiceReferences(clazz, filter);
- }
- };
- }
-
- private void invokeMainDeployer(String method, URL archiveURL) throws Exception
- {
- ObjectName oname = new ObjectName("jboss.system:service=MainDeployer");
- getMBeanServer().invoke(oname, method, new Object[] { archiveURL }, new String[] { URL.class.getName() });
- }
-}
Copied: projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java (from rev 95389, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/testing/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -0,0 +1,298 @@
+/*
+ * 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.spi.testing.internal;
+
+// $Id$
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.management.MBeanProxyException;
+import org.jboss.osgi.spi.management.ManagedBundleMBean;
+import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
+import org.jboss.osgi.spi.management.ManagedServiceReference;
+import org.jboss.osgi.spi.testing.OSGiBundle;
+import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiServiceReference;
+import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.jboss.osgi.spi.util.BundleInfo;
+import org.osgi.framework.BundleException;
+
+/**
+ * A remote implementation of the {@link OSGiRuntime}
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Sep-2008
+ */
+public class RemoteRuntime extends OSGiRuntimeImpl
+{
+ private MBeanServerConnection mbeanServer;
+ private ManagedFrameworkMBean managedFramework;
+
+ public RemoteRuntime(OSGiTestHelper helper)
+ {
+ super(helper);
+ }
+
+ public OSGiBundle installBundle(String location) throws BundleException
+ {
+ try
+ {
+ URL bundleURL = getTestHelper().getTestArchiveURL(location);
+ BundleInfo bundleInfo = BundleInfo.createBundleInfo(bundleURL);
+
+ deployInternal(location, true);
+
+ String symbolicName = bundleInfo.getSymbolicName();
+ String version = bundleInfo.getVersion().toString();
+ ManagedBundleMBean bundleMBean = getRemoteFramework().getBundle(symbolicName, version);
+ RemoteBundle bundle = new RemoteBundle(this, bundleMBean, location);
+ return registerBundle(location, bundle);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (MBeanException ex)
+ {
+ Exception target = ex.getTargetException();
+ if (target instanceof BundleException)
+ throw (BundleException)target;
+
+ throw new BundleException("Cannot install: " + location, target);
+ }
+ catch (Exception ex)
+ {
+ throw new BundleException("Cannot install: " + location, ex);
+ }
+ }
+
+ public void deploy(String location) throws Exception
+ {
+ deployInternal(location, false);
+ }
+
+ private void deployInternal(String location, boolean isBundle) throws Exception
+ {
+ URL archiveURL = getTestHelper().getTestArchiveURL(location);
+ if (isBundle)
+ invokeDeployerService("deploy", archiveURL);
+ else
+ invokeMainDeployer("deploy", archiveURL);
+ }
+
+ public void undeploy(String location) throws Exception
+ {
+ URL archiveURL = getTestHelper().getTestArchiveURL(location);
+ if (isBundleArchive(location))
+ invokeDeployerService("undeploy", archiveURL);
+ else
+ invokeMainDeployer("undeploy", archiveURL);
+ }
+
+ private boolean isBundleArchive(String location)
+ {
+ try
+ {
+ URL archiveURL = getTestHelper().getTestArchiveURL(location);
+ BundleInfo.createBundleInfo(archiveURL);
+ return true;
+ }
+ catch (RuntimeException ex)
+ {
+ return false;
+ }
+ }
+
+ public OSGiBundle[] getBundles()
+ {
+ try
+ {
+ Set<ManagedBundleMBean> remoteBundles = getRemoteFramework().getBundles();
+ Set<OSGiBundle> bundles = new HashSet<OSGiBundle>();
+ for (ManagedBundleMBean remoteBundle : remoteBundles)
+ bundles.add(new RemoteBundle(this, remoteBundle, null));
+
+ OSGiBundle[] bundleArr = new OSGiBundle[bundles.size()];
+ bundles.toArray(bundleArr);
+
+ return bundleArr;
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot obtain remote bundles", ex);
+ }
+ }
+
+ public OSGiBundle getBundle(long bundleId)
+ {
+ ManagedBundleMBean bundle = getRemoteFramework().getBundle(bundleId);
+ return bundle != null ? new RemoteBundle(this, bundle, null) : null;
+ }
+
+ public OSGiServiceReference getServiceReference(String clazz)
+ {
+ ManagedServiceReference manref = getRemoteFramework().getServiceReference(clazz);
+ return manref != null ? new RemoteServiceReference(manref) : null;
+ }
+
+ public OSGiServiceReference[] getServiceReferences(String clazz, String filter)
+ {
+ OSGiServiceReference[] srefs = null;
+
+ ManagedServiceReference[] manrefs = getRemoteFramework().getServiceReferences(clazz, filter);
+ if (manrefs != null)
+ {
+ srefs = new OSGiServiceReference[manrefs.length];
+ for (int i = 0; i < manrefs.length; i++)
+ srefs[i] = new RemoteServiceReference(manrefs[i]);
+ }
+
+ return srefs;
+ }
+
+ public MBeanServerConnection getMBeanServer()
+ {
+ if (mbeanServer == null)
+ {
+ try
+ {
+ InitialContext iniCtx = getInitialContext();
+ mbeanServer = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection", ex);
+ }
+ }
+ return mbeanServer;
+ }
+
+ public OSGiPackageAdmin getPackageAdmin()
+ {
+ return new RemotePackageAdmin(this);
+ }
+
+ @Override
+ public void shutdown()
+ {
+ OSGiBootstrapProvider bootProvider = getTestHelper().getBootstrapProvider();
+ if (bootProvider != null)
+ {
+ super.shutdown();
+ getPackageAdmin().refreshPackages(null);
+ getTestHelper().ungetBootstrapProvider();
+ }
+ }
+
+ private RemoteFramework getRemoteFramework()
+ {
+ try
+ {
+ if (managedFramework == null)
+ managedFramework = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, getMBeanServer());
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+
+ return new RemoteFramework()
+ {
+ public ManagedBundleMBean getBundle(String symbolicName, String version)
+ {
+ ObjectName oname = managedFramework.getBundle(symbolicName, version);
+ if (oname == null)
+ throw new IllegalArgumentException("Cannot get remote bundle for: " + symbolicName);
+
+ try
+ {
+ return MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+ }
+
+ public ManagedBundleMBean getBundle(long bundleId)
+ {
+ ObjectName oname = managedFramework.getBundle(bundleId);
+ if (oname == null)
+ throw new IllegalArgumentException("Cannot get remote bundle for: " + bundleId);
+
+ try
+ {
+ return MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+ }
+
+ public Set<ManagedBundleMBean> getBundles()
+ {
+ Set<ManagedBundleMBean> remBundles = new HashSet<ManagedBundleMBean>();
+ for (ObjectName bundleOName : managedFramework.getBundles())
+ {
+ try
+ {
+ ManagedBundleMBean remBundle = MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getMBeanServer());
+ remBundles.add(remBundle);
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+ }
+ return remBundles;
+ }
+
+ public ManagedServiceReference getServiceReference(String clazz)
+ {
+ return managedFramework.getServiceReference(clazz);
+ }
+
+ public ManagedServiceReference[] getServiceReferences(String clazz, String filter)
+ {
+ return managedFramework.getServiceReferences(clazz, filter);
+ }
+ };
+ }
+
+ private void invokeMainDeployer(String method, URL archiveURL) throws Exception
+ {
+ ObjectName oname = new ObjectName("jboss.system:service=MainDeployer");
+ getMBeanServer().invoke(oname, method, new Object[] { archiveURL }, new String[] { URL.class.getName() });
+ }
+}
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-22 10:28:59 UTC (rev 95390)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-22 11:39:22 UTC (rev 95391)
@@ -54,7 +54,7 @@
@BeforeClass
public static void setUpClass() throws Exception
{
- runtime = new OSGiTestHelper().getRemoteRuntime();
+ runtime = (RemoteRuntime)new OSGiTestHelper().getRemoteRuntime();
runtime.addCapability(new JNDICapability());
runtime.addCapability(new JMXCapability());
runtime.addCapability(new MicrocontainerCapability());
16 years, 2 months
JBoss-OSGI SVN: r95389 - in projects/jboss-osgi: projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix and 20 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-22 06:03:18 -0400 (Thu, 22 Oct 2009)
New Revision: 95389
Added:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentActivator.java
Removed:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegration.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java
Modified:
projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java
projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jndi/JNDITestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Add system services to framework AS integration.
Unget the bootstrap provider
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.deployment.DeploymentServices;
+import org.jboss.osgi.deployment.DeploymentActivator;
import org.jboss.osgi.spi.framework.PropertiesBootstrapProvider;
import org.osgi.framework.BundleContext;
@@ -35,19 +35,19 @@
*/
public class EquinoxBootstrapProvider extends PropertiesBootstrapProvider
{
- private DeploymentServices deploymentServices;
+ private DeploymentActivator deploymentActivator;
@Override
protected void registerSystemServices(BundleContext context)
{
- deploymentServices = new DeploymentServices();
- deploymentServices.start(context);
+ deploymentActivator = new DeploymentActivator();
+ deploymentActivator.start(context);
}
@Override
protected void unregisterSystemServices(BundleContext context)
{
- if (deploymentServices != null)
- deploymentServices.stop(context);
+ if (deploymentActivator != null)
+ deploymentActivator.stop(context);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -25,8 +25,10 @@
import java.util.Map;
-import org.jboss.osgi.spi.framework.FrameworkIntegration;
+import org.jboss.osgi.deployment.DeploymentActivator;
+import org.jboss.osgi.spi.framework.FrameworkIntegrationBean;
import org.jboss.osgi.spi.util.ServiceLoader;
+import org.osgi.framework.BundleContext;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
import org.slf4j.Logger;
@@ -38,10 +40,12 @@
* @author thomas.diesler(a)jboss.com
* @since 23-Jan-2009
*/
-public class EquinoxIntegration extends FrameworkIntegration
+public class EquinoxIntegration extends FrameworkIntegrationBean
{
// Provide logging
final Logger log = LoggerFactory.getLogger(EquinoxIntegration.class);
+
+ private DeploymentActivator deploymentActivator;
@Override
protected Framework createFramework(Map<String, Object> properties)
@@ -55,4 +59,18 @@
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
return factory.newFramework(properties);
}
+
+ @Override
+ protected void registerSystemServices(BundleContext context)
+ {
+ deploymentActivator = new DeploymentActivator();
+ deploymentActivator.start(context);
+ }
+
+ @Override
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ if (deploymentActivator != null)
+ deploymentActivator.stop(context);
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -23,9 +23,10 @@
//$Id$
-import org.jboss.osgi.deployment.DeploymentServices;
+import org.jboss.osgi.deployment.DeploymentActivator;
import org.jboss.osgi.spi.framework.PropertiesBootstrapProvider;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.launch.Framework;
/**
* A bootstrap provider for Felix.
@@ -35,19 +36,26 @@
*/
public class FelixBootstrapProvider extends PropertiesBootstrapProvider
{
- private DeploymentServices deploymentServices;
+ private DeploymentActivator deploymentActivator;
@Override
+ public Framework getFramework()
+ {
+ Framework framework = super.getFramework();
+ return new FelixFrameworkWrapper(framework);
+ }
+
+ @Override
protected void registerSystemServices(BundleContext context)
{
- deploymentServices = new DeploymentServices();
- deploymentServices.start(context);
+ deploymentActivator = new DeploymentActivator();
+ deploymentActivator.start(context);
}
@Override
protected void unregisterSystemServices(BundleContext context)
{
- if (deploymentServices != null)
- deploymentServices.stop(context);
+ if (deploymentActivator != null)
+ deploymentActivator.stop(context);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -38,7 +38,7 @@
import org.slf4j.LoggerFactory;
/**
- * The FelixBundleContextWrapper wrapps the BundleContext provided by the Felix implemenation.
+ * Wraps the BundleContext provided by the Felix implementation.
*
* It provides additional functionality on bundle install.
*
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -26,8 +26,6 @@
import org.jboss.osgi.spi.framework.FrameworkWrapper;
import org.osgi.framework.BundleContext;
import org.osgi.framework.launch.Framework;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Wraps the Framework provided by the Felix implementation.
@@ -37,9 +35,6 @@
*/
class FelixFrameworkWrapper extends FrameworkWrapper
{
- // Provide logging
- final Logger log = LoggerFactory.getLogger(FelixFrameworkWrapper.class);
-
FelixFrameworkWrapper(Framework framework)
{
super(framework);
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -25,8 +25,10 @@
import java.util.Map;
-import org.jboss.osgi.spi.framework.FrameworkIntegration;
+import org.jboss.osgi.deployment.DeploymentActivator;
+import org.jboss.osgi.spi.framework.FrameworkIntegrationBean;
import org.jboss.osgi.spi.util.ServiceLoader;
+import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
@@ -39,11 +41,13 @@
* @author thomas.diesler(a)jboss.com
* @since 23-Jan-2009
*/
-public class FelixIntegration extends FrameworkIntegration
+public class FelixIntegration extends FrameworkIntegrationBean
{
// Provide logging
final Logger log = LoggerFactory.getLogger(FelixIntegration.class);
+ private DeploymentActivator deploymentActivator;
+
@Override
protected Framework createFramework(Map<String, Object> properties)
{
@@ -64,11 +68,28 @@
return factory.newFramework(properties);
}
+ @Override
+ protected void registerSystemServices(BundleContext context)
+ {
+ deploymentActivator = new DeploymentActivator();
+ deploymentActivator.start(context);
+ }
+
+ @Override
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ if (deploymentActivator != null)
+ deploymentActivator.stop(context);
+ }
+
public void stop()
{
final Framework framework = getFramework();
if (framework != null)
{
+ // Unregister system services
+ unregisterSystemServices(getBundleContext());
+
// Running the Felix shutdown in a separate thread that gets
// interrupted after a 10sec timeout. This is a workaround for
//
Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegration.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegration.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegration.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -1,225 +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.osgi.spi.framework;
-
-//$Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.osgi.spi.FrameworkException;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.launch.Framework;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An abstraction of an OSGi Framework.
- *
- * In addition to the standard {@link Framework} this implementation also
- * supports properties and initial bundle provisioning.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Jan-2009
- */
-public abstract class FrameworkIntegration
-{
- // Provide logging
- final Logger log = LoggerFactory.getLogger(FrameworkIntegration.class);
-
- private Map<String, Object> properties = new HashMap<String, Object>();
- private List<URL> autoInstall = new ArrayList<URL>();
- private List<URL> autoStart = new ArrayList<URL>();
-
- private Framework framework;
-
- public Map<String, Object> getProperties()
- {
- return properties;
- }
-
- public void setProperties(Map<String, Object> props)
- {
- this.properties = props;
- }
-
- public List<URL> getAutoInstall()
- {
- return autoInstall;
- }
-
- public void setAutoInstall(List<URL> autoInstall)
- {
- this.autoInstall = autoInstall;
- }
-
- public List<URL> getAutoStart()
- {
- return autoStart;
- }
-
- public void setAutoStart(List<URL> autoStart)
- {
- this.autoStart = autoStart;
- }
-
- public Bundle getBundle()
- {
- assertFrameworkStart();
- return getFramework();
- }
-
- public BundleContext getBundleContext()
- {
- assertFrameworkStart();
- return getFramework().getBundleContext();
- }
-
- public Framework getFramework()
- {
- if (framework == null)
- framework = createFramework(properties);
-
- return framework;
- }
-
- public void create()
- {
- if (framework == null)
- framework = createFramework(properties);
- }
-
- /** Overwrite to create the framework */
- protected abstract Framework createFramework(Map<String, Object> properties);
-
- public void start()
- {
- // Create the Framework instance
- assertFrameworkCreate();
-
- // Start the System Bundle
- try
- {
- getFramework().start();
- }
- catch (BundleException ex)
- {
- throw new FrameworkException("Cannot start system bundle", ex);
- }
-
- // Get system bundle context
- BundleContext context = getFramework().getBundleContext();
- if (context == null)
- throw new FrameworkException("Cannot obtain system context");
-
- // Log the the framework packages
- ExportedPackageHelper packageHelper = new ExportedPackageHelper(context);
- packageHelper.logExportedPackages(getBundle());
-
- Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
-
- // Add the autoStart bundles to autoInstall
- for (URL bundleURL : autoStart)
- {
- autoInstall.add(bundleURL);
- }
-
- // Install autoInstall bundles
- for (URL bundleURL : autoInstall)
- {
- try
- {
- Bundle bundle = context.installBundle(bundleURL.toString());
- long bundleId = bundle.getBundleId();
- log.info("Installed bundle [" + bundleId + "]: " + bundle.getSymbolicName());
- autoBundles.put(bundleURL, bundle);
- }
- catch (BundleException ex)
- {
- stop();
- throw new IllegalStateException("Cannot install bundle: " + bundleURL, ex);
- }
- }
-
- // Start autoStart bundles
- for (URL bundleURL : autoStart)
- {
- try
- {
- Bundle bundle = autoBundles.get(bundleURL);
- if (bundle != null)
- {
- bundle.start();
- packageHelper.logExportedPackages(bundle);
- log.info("Started bundle: " + bundle.getSymbolicName());
- }
- }
- catch (BundleException ex)
- {
- stop();
- throw new IllegalStateException("Cannot start bundle: " + bundleURL, ex);
- }
- }
- }
-
- public void stop()
- {
- Framework framework = getFramework();
- if (framework != null)
- {
- try
- {
- framework.stop();
- framework.waitForStop(5000);
- framework = null;
- log.debug("SystemBundle STOPPED");
- }
- catch (BundleException ex)
- {
- log.error("Cannot stop Framework", ex);
- }
- catch (InterruptedException ex)
- {
- log.error("Cannot stop Framework", ex);
- }
- }
- }
-
- private void assertFrameworkCreate()
- {
- if (getFramework() == null)
- create();
- }
-
- private void assertFrameworkStart()
- {
- assertFrameworkCreate();
- if ((getFramework().getState() & Bundle.ACTIVE) == 0)
- start();
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java (from rev 95382, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegration.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -0,0 +1,247 @@
+/*
+ * 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.spi.framework;
+
+//$Id$
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.osgi.spi.FrameworkException;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.launch.Framework;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An abstraction of an OSGi Framework.
+ *
+ * In addition to the standard {@link Framework} this implementation also
+ * supports properties and initial bundle provisioning.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public abstract class FrameworkIntegrationBean
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(FrameworkIntegrationBean.class);
+
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private List<URL> autoInstall = new ArrayList<URL>();
+ private List<URL> autoStart = new ArrayList<URL>();
+
+ private Framework framework;
+
+ public Map<String, Object> getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ this.properties = props;
+ }
+
+ public List<URL> getAutoInstall()
+ {
+ return autoInstall;
+ }
+
+ public void setAutoInstall(List<URL> autoInstall)
+ {
+ this.autoInstall = autoInstall;
+ }
+
+ public List<URL> getAutoStart()
+ {
+ return autoStart;
+ }
+
+ public void setAutoStart(List<URL> autoStart)
+ {
+ this.autoStart = autoStart;
+ }
+
+ public Bundle getBundle()
+ {
+ assertFrameworkStart();
+ return getFramework();
+ }
+
+ public BundleContext getBundleContext()
+ {
+ assertFrameworkStart();
+ return getFramework().getBundleContext();
+ }
+
+ public Framework getFramework()
+ {
+ if (framework == null)
+ framework = createFramework(properties);
+
+ return framework;
+ }
+
+ public void create()
+ {
+ if (framework == null)
+ framework = createFramework(properties);
+ }
+
+ /** Overwrite to create the framework */
+ protected abstract Framework createFramework(Map<String, Object> properties);
+
+ public void start()
+ {
+ // Create the Framework instance
+ assertFrameworkCreate();
+
+ // Start the System Bundle
+ try
+ {
+ getFramework().start();
+ }
+ catch (BundleException ex)
+ {
+ throw new FrameworkException("Cannot start system bundle", ex);
+ }
+
+ // Get system bundle context
+ BundleContext context = getFramework().getBundleContext();
+ if (context == null)
+ throw new FrameworkException("Cannot obtain system context");
+
+ // Log the the framework packages
+ ExportedPackageHelper packageHelper = new ExportedPackageHelper(context);
+ packageHelper.logExportedPackages(getBundle());
+
+ Map<URL, Bundle> autoBundles = new HashMap<URL, Bundle>();
+
+ // Add the autoStart bundles to autoInstall
+ for (URL bundleURL : autoStart)
+ {
+ autoInstall.add(bundleURL);
+ }
+
+ // Register system services
+ registerSystemServices(context);
+
+ // Install autoInstall bundles
+ for (URL bundleURL : autoInstall)
+ {
+ try
+ {
+ Bundle bundle = context.installBundle(bundleURL.toString());
+ long bundleId = bundle.getBundleId();
+ log.info("Installed bundle [" + bundleId + "]: " + bundle.getSymbolicName());
+ autoBundles.put(bundleURL, bundle);
+ }
+ catch (BundleException ex)
+ {
+ stop();
+ throw new IllegalStateException("Cannot install bundle: " + bundleURL, ex);
+ }
+ }
+
+ // Start autoStart bundles
+ for (URL bundleURL : autoStart)
+ {
+ try
+ {
+ Bundle bundle = autoBundles.get(bundleURL);
+ if (bundle != null)
+ {
+ bundle.start();
+ packageHelper.logExportedPackages(bundle);
+ log.info("Started bundle: " + bundle.getSymbolicName());
+ }
+ }
+ catch (BundleException ex)
+ {
+ stop();
+ throw new IllegalStateException("Cannot start bundle: " + bundleURL, ex);
+ }
+ }
+ }
+
+ public void stop()
+ {
+ Framework framework = getFramework();
+ if (framework != null)
+ {
+ // Unregister system services
+ unregisterSystemServices(getBundleContext());
+
+ try
+ {
+ framework.stop();
+ framework.waitForStop(5000);
+ framework = null;
+ log.debug("SystemBundle STOPPED");
+ }
+ catch (BundleException ex)
+ {
+ log.error("Cannot stop Framework", ex);
+ }
+ catch (InterruptedException ex)
+ {
+ log.error("Cannot stop Framework", ex);
+ }
+ }
+ }
+
+ /**
+ * Overwrite to register system services before bundles get installed.
+ */
+ protected void registerSystemServices(BundleContext context)
+ {
+ // no default system services
+ }
+
+ /**
+ * Overwrite to unregister system services before bundles get installed.
+ */
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ // no default system services
+ }
+
+ private void assertFrameworkCreate()
+ {
+ if (getFramework() == null)
+ create();
+ }
+
+ private void assertFrameworkStart()
+ {
+ assertFrameworkCreate();
+ if ((getFramework().getState() & Bundle.ACTIVE) == 0)
+ start();
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -27,6 +27,8 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.osgi.spi.testing.internal.EmbeddedRuntime;
+import org.jboss.osgi.spi.testing.internal.RemoteRuntime;
import org.jboss.virtual.VFS;
import org.junit.After;
import org.junit.Before;
@@ -116,7 +118,7 @@
/**
* Delegates to {@link OSGiTestHelper#getEmbeddedRuntime()}
*/
- protected OSGiRuntime getEmbeddedRuntime()
+ protected EmbeddedRuntime getEmbeddedRuntime()
{
return getTestHelper().getEmbeddedRuntime();
}
@@ -124,7 +126,7 @@
/**
* Delegates to {@link OSGiTestHelper#getRemoteRuntime()}
*/
- public OSGiRuntime getRemoteRuntime()
+ public RemoteRuntime getRemoteRuntime()
{
return getTestHelper().getRemoteRuntime();
}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -75,6 +75,11 @@
return bootProvider;
}
+ public void ungetBootstrapProvider()
+ {
+ bootProvider = null;
+ }
+
public OSGiRuntime getDefaultRuntime()
{
OSGiRuntime runtime;
@@ -91,12 +96,12 @@
return runtime;
}
- public OSGiRuntime getEmbeddedRuntime()
+ public EmbeddedRuntime getEmbeddedRuntime()
{
return new EmbeddedRuntime(this);
}
- public OSGiRuntime getRemoteRuntime()
+ public RemoteRuntime getRemoteRuntime()
{
return new RemoteRuntime(this);
}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/EmbeddedRuntime.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -151,6 +151,7 @@
{
log.error("Cannot stop the framework", ex);
}
+ getTestHelper().ungetBootstrapProvider();
}
}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -210,6 +210,7 @@
{
super.shutdown();
getPackageAdmin().refreshPackages(null);
+ getTestHelper().ungetBootstrapProvider();
}
}
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/pom.xml 2009-10-22 10:03:18 UTC (rev 95389)
@@ -72,6 +72,10 @@
<version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
<version.ops4j.pax.web>0.7.1</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
+
+ <surefire.memory.args>-Xmx512m</surefire.memory.args>
+ <surefire.jpda.args></surefire.jpda.args>
+ <surefire.profiler.args></surefire.profiler.args>
</properties>
<!-- DependencyManagement -->
@@ -283,6 +287,14 @@
<enabled>true</enabled>
</snapshots>
</repository>
+ <repository>
+ <id>ops4j.snapshots</id>
+ <name>The OPS4J Snapshot Repository</name>
+ <url>http://repository.ops4j.org/mvn-snapshots/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
</repositories>
<!-- Profiles -->
@@ -320,19 +332,28 @@
<name>jpda</name>
</property>
</activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <properties>
+ <surefire.jpda.args>-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</surefire.jpda.args>
+ </properties>
</profile>
<!--
+ Name: yourkit
+ Descr: Enable YourKit remote profiling
+ -->
+ <profile>
+ <id>yourkit</id>
+ <activation>
+ <property>
+ <name>yourkit</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.profiler.args>-agentlib:yjpagent=onexit=memory</surefire.profiler.args>
+ </properties>
+ </profile>
+
+ <!--
Name: embedded-testing
Descr: Setup for embedded integration testing
-->
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentActivator.java (from rev 95382, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentActivator.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -0,0 +1,101 @@
+/*
+ * 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;
+
+//$Id$
+
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
+import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService;
+import org.jboss.osgi.deployment.internal.DeploymentRegistryServiceImpl;
+import org.jboss.osgi.deployment.internal.LifecycleInterceptorServiceImpl;
+import org.jboss.osgi.deployment.internal.SystemDeployerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The deployers activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 15-Oct-2009
+ */
+public class DeploymentActivator
+{
+ public void start(BundleContext context)
+ {
+ if (context == null)
+ throw new IllegalArgumentException("Null BundleContext");
+
+ // Register the DeploymentRegistryService
+ DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
+ context.registerService(DeploymentRegistryService.class.getName(), registry, null);
+
+ // Register the SystemDeployerService
+ Properties props = new Properties();
+ props.put("provider", "system");
+ final SystemDeployerService deployerService = new SystemDeployerService(context);
+ context.registerService(DeployerService.class.getName(), deployerService, props);
+
+ // Register the lifecycle interceptor related services
+ LifecycleInterceptorService service = new LifecycleInterceptorServiceImpl(context);
+ context.registerService(LifecycleInterceptorService.class.getName(), service, null);
+
+ // Track other DeployerService implementations and register as MBean
+ ServiceTracker serviceTracker = new ServiceTracker(context, DeployerService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ DeployerService service = (DeployerService)super.addingService(reference);
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ if (sref != null)
+ {
+ MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
+ deployerService.registerDeployerServiceMBean(context, mbeanServer);
+ }
+ return service;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ if (sref != null)
+ {
+ MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
+ deployerService.unregisterDeployerServiceMBean(mbeanServer);
+ }
+ super.removedService(reference, service);
+ }
+ };
+ serviceTracker.open();
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -1,101 +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.osgi.deployment;
-
-//$Id$
-
-import java.util.Properties;
-
-import javax.management.MBeanServer;
-
-import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
-import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService;
-import org.jboss.osgi.deployment.internal.DeploymentRegistryServiceImpl;
-import org.jboss.osgi.deployment.internal.LifecycleInterceptorServiceImpl;
-import org.jboss.osgi.deployment.internal.SystemDeployerService;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The deployers activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 15-Oct-2009
- */
-public class DeploymentServices
-{
- public void start(BundleContext context)
- {
- if (context == null)
- throw new IllegalArgumentException("Null BundleContext");
-
- // Register the DeploymentRegistryService
- DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
- context.registerService(DeploymentRegistryService.class.getName(), registry, null);
-
- // Register the SystemDeployerService
- Properties props = new Properties();
- props.put("provider", "system");
- final SystemDeployerService deployerService = new SystemDeployerService(context);
- context.registerService(DeployerService.class.getName(), deployerService, props);
-
- // Register the lifecycle interceptor related services
- LifecycleInterceptorService service = new LifecycleInterceptorServiceImpl(context);
- context.registerService(LifecycleInterceptorService.class.getName(), service, null);
-
- // Track other DeployerService implementations and register as MBean
- ServiceTracker serviceTracker = new ServiceTracker(context, DeployerService.class.getName(), null)
- {
- @Override
- public Object addingService(ServiceReference reference)
- {
- DeployerService service = (DeployerService)super.addingService(reference);
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- if (sref != null)
- {
- MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- deployerService.registerDeployerServiceMBean(context, mbeanServer);
- }
- return service;
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service)
- {
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- if (sref != null)
- {
- MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- deployerService.unregisterDeployerServiceMBean(mbeanServer);
- }
- super.removedService(reference, service);
- }
- };
- serviceTracker.open();
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -30,7 +30,6 @@
import javax.management.MBeanServer;
import org.jboss.osgi.blueprint.BlueprintCapability;
-import org.jboss.osgi.husky.Bridge;
import org.jboss.osgi.husky.BridgeFactory;
import org.jboss.osgi.husky.HuskyCapability;
import org.jboss.osgi.husky.annotation.ProvideContext;
@@ -58,9 +57,7 @@
{
@ProvideContext
public static BundleContext context;
-
private static OSGiRuntime runtime;
- private static Bridge huskyBridge;
@BeforeClass
public static void beforeClass() throws Exception
@@ -71,8 +68,6 @@
runtime.addCapability(new HuskyCapability());
runtime.addCapability(new BlueprintCapability());
- huskyBridge = BridgeFactory.getBridge();
-
OSGiBundle bundle = runtime.installBundle("example-blueprint.jar");
bundle.start();
}
@@ -82,14 +77,18 @@
public static void afterClass() throws Exception
{
if (context == null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
+ context = null;
}
@Test
public void testBlueprintBundleInstall() throws Exception
{
if (context == null)
- huskyBridge.run();
+ BridgeFactory.getBridge().run();
assumeNotNull(context);
@@ -101,7 +100,7 @@
public void testBlueprintContainerAvailable() throws Exception
{
if (context == null)
- huskyBridge.run();
+ BridgeFactory.getBridge().run();
assumeNotNull(context);
@@ -113,7 +112,7 @@
public void testServiceA() throws Exception
{
if (context == null)
- huskyBridge.run();
+ BridgeFactory.getBridge().run();
assumeNotNull(context);
@@ -129,7 +128,7 @@
public void testServiceB() throws Exception
{
if (context == null)
- huskyBridge.run();
+ BridgeFactory.getBridge().run();
assumeNotNull(context);
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -75,6 +75,7 @@
public static void tearDownClass() throws Exception
{
runtime.shutdown();
+ runtime = null;
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -59,7 +59,10 @@
public static void tearDownClass() throws Exception
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jndi/JNDITestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jndi/JNDITestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jndi/JNDITestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -58,7 +58,10 @@
public static void tearDownClass() throws Exception
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -66,7 +66,10 @@
public static void tearDownClass() throws Exception
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -65,6 +65,7 @@
public static void tearDownClass() throws Exception
{
runtime.shutdown();
+ runtime = null;
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -80,7 +80,11 @@
{
// Only do this if we are not within the OSGi Runtime
if (context == null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
+ context = null;
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -84,7 +84,11 @@
{
// Only do this if we are not within the OSGi Runtime
if (context == null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
+ context = null;
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -82,7 +82,11 @@
{
// Only do this if we are not within the OSGi Runtime
if (context == null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
+ context = null;
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-22 10:03:18 UTC (rev 95389)
@@ -12,7 +12,7 @@
felix.log.logger.instance=org.jboss.osgi.felix.FelixLogger
# Framework bootdelegation
-# org.osgi.framework.bootdelegation=org.osgi.service.log
+org.osgi.framework.bootdelegation=com.yourkit.runtime
# Extra System Packages
org.osgi.framework.system.packages.extra=\
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -63,7 +63,10 @@
public static void afterClass() throws BundleException
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
@Before
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -57,7 +57,10 @@
public static void afterClass() throws BundleException
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
/**
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGI92TestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -61,7 +61,10 @@
public static void afterClass() throws BundleException
{
if (runtime != null)
+ {
runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -31,8 +31,6 @@
import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
-import org.jboss.osgi.spi.testing.OSGiBundle;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiTest;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
import org.jboss.osgi.spi.testing.internal.RemoteRuntime;
@@ -51,8 +49,7 @@
*/
public class OSGI36TestCase extends OSGiTest
{
- static OSGiRuntime runtime;
- static OSGiBundle bundle;
+ private static RemoteRuntime runtime;
@BeforeClass
public static void setUpClass() throws Exception
@@ -62,16 +59,19 @@
runtime.addCapability(new JMXCapability());
runtime.addCapability(new MicrocontainerCapability());
- bundle = runtime.installBundle("jbosgi36-bundle.jar");
- ((RemoteRuntime)runtime).deploy("jbosgi36-mbean.jar");
+ runtime.installBundle("jbosgi36-bundle.jar");
+ runtime.deploy("jbosgi36-mbean.jar");
}
@AfterClass
public static void tearDownClass() throws Exception
{
- ((RemoteRuntime)runtime).undeploy("jbosgi36-mbean.jar");
-
- runtime.shutdown();
+ if (runtime != null)
+ {
+ runtime.undeploy("jbosgi36-mbean.jar");
+ runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-22 10:03:18 UTC (rev 95389)
@@ -78,7 +78,11 @@
@AfterClass
public static void tearDownClass() throws Exception
{
- runtime.shutdown();
+ if (runtime != null)
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
}
@Test
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-22 09:55:48 UTC (rev 95388)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-22 10:03:18 UTC (rev 95389)
@@ -37,6 +37,7 @@
<!-- Properties -->
<properties>
+ <surefire.system.args>${surefire.memory.args} ${surefire.jpda.args} ${surefire.profiler.args}</surefire.system.args>
<version.jmx.invoker.adaptor.client>5.0.1.GA</version.jmx.invoker.adaptor.client>
<version.jnp.client>5.0.1.GA</version.jnp.client>
</properties>
@@ -132,7 +133,7 @@
<artifactId>jboss-osgi-webapp</artifactId>
<scope>provided</scope>
</dependency>
-
+
<!-- OPS4J -->
<dependency>
<groupId>org.ops4j.pax.web</groupId>
@@ -168,6 +169,14 @@
<filtering>true</filtering>
</testResource>
</testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${surefire.system.args}</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<!-- Profiles -->
@@ -202,16 +211,6 @@
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xmx512m</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
@@ -236,16 +235,6 @@
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xmx512m</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
@@ -272,16 +261,6 @@
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xmx512m</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<profile>
<id>framework-default</id>
@@ -302,18 +281,6 @@
<scope>provided</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- YourKit Profiling
- <argLine>-agentlib:yjpagent=onexit=memory</argLine>
- -->
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
16 years, 2 months
JBoss-OSGI SVN: r95375 - in projects/jboss-osgi: projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy and 16 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-22 02:01:08 -0400 (Thu, 22 Oct 2009)
New Revision: 95375
Added:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/DeploymentScannerService.java
projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/java/org/jboss/test/osgi/equinox/OSGiBootstrapTestCase.java
projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/
projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/services/
projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/jboss-osgi-framework.properties
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java
Removed:
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/
Modified:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java
projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml
projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java
projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java
projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/test/resources/jboss-osgi-framework.properties
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkWrapper.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
Log:
Add notion of system services to framework bootstrap
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-22 06:01:08 UTC (rev 95375)
@@ -91,13 +91,15 @@
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.hotdeploy.internal.DeploymentScannerActivator</Bundle-Activator>
+ <Export-Package>
+ org.jboss.osgi.hotdeploy;version=${version}
+ </Export-Package>
<Private-Package>org.jboss.osgi.hotdeploy.internal</Private-Package>
<Import-Package>
javax.management,
org.jboss.osgi.common.log;version=1.0,
org.jboss.osgi.deployment.common,
org.jboss.osgi.deployment.deployer,
- org.jboss.osgi.deployment.scanner,
org.jboss.osgi.spi.service;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
org.osgi.framework,
Copied: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/DeploymentScannerService.java (from rev 95358, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/DeploymentScannerService.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/DeploymentScannerService.java (rev 0)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/DeploymentScannerService.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -0,0 +1,81 @@
+/*
+ * 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.hotdeploy;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.osgi.deployment.common.Deployment;
+
+
+/**
+ * A service that scans a directory location for new/removed bundles.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-May-2009
+ */
+public interface DeploymentScannerService
+{
+ /**
+ * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
+ */
+ String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
+
+ /**
+ * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
+ */
+ String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
+
+ /**
+ * Get the scan location URL.
+ *
+ * This is can be specified by setting the {@link #PROPERTY_SCAN_LOCATION} property.
+ */
+ URL getScanLocation();
+
+ /**
+ * The number of scans since the service started
+ */
+ long getScanCount();
+
+ /**
+ * The number of milliseconds between scans
+ * Defaults to 2000ms
+ */
+ long getScanInterval();
+
+ /**
+ * The timestamp of the last change
+ */
+ long getLastChange();
+
+ /**
+ * Run a directory scan
+ */
+ void scan();
+
+ /**
+ * Returns the array of bundles currently known to the deployemtn scanner.
+ */
+ Deployment[] getBundleDeployments();
+}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
+import org.jboss.osgi.hotdeploy.DeploymentScannerService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -36,7 +36,7 @@
import org.jboss.osgi.deployment.common.Deployment;
import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
+import org.jboss.osgi.hotdeploy.DeploymentScannerService;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -72,6 +72,9 @@
// Get the DeployerService
ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("Cannot obtain deployer service");
+
deployer = (DeployerService)context.getService(sref);
initScanner(context);
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -24,7 +24,7 @@
//$Id$
import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
+import org.jboss.osgi.hotdeploy.DeploymentScannerService;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/pom.xml 2009-10-22 06:01:08 UTC (rev 95375)
@@ -39,6 +39,7 @@
<!-- Properties -->
<properties>
<version.eclipse.equinox>3.5</version.eclipse.equinox>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
</properties>
@@ -50,6 +51,12 @@
<version>${version.jboss.osgi.spi}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${version.eclipse.equinox}</version>
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxBootstrapProvider.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -23,7 +23,9 @@
//$Id$
+import org.jboss.osgi.deployment.DeploymentServices;
import org.jboss.osgi.spi.framework.PropertiesBootstrapProvider;
+import org.osgi.framework.BundleContext;
/**
* A bootstrap provider for Equinox.
@@ -33,4 +35,19 @@
*/
public class EquinoxBootstrapProvider extends PropertiesBootstrapProvider
{
+ private DeploymentServices deploymentServices;
+
+ @Override
+ protected void registerSystemServices(BundleContext context)
+ {
+ deploymentServices = new DeploymentServices();
+ deploymentServices.start(context);
+ }
+
+ @Override
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ if (deploymentServices != null)
+ deploymentServices.stop(context);
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/main/java/org/jboss/osgi/equinox/EquinoxIntegration.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -25,11 +25,12 @@
import java.util.Map;
-import org.jboss.logging.Logger;
import org.jboss.osgi.spi.framework.FrameworkIntegration;
import org.jboss.osgi.spi.util.ServiceLoader;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Equinox specific OSGi Framework integration.
@@ -40,7 +41,7 @@
public class EquinoxIntegration extends FrameworkIntegration
{
// Provide logging
- final Logger log = Logger.getLogger(EquinoxIntegration.class);
+ final Logger log = LoggerFactory.getLogger(EquinoxIntegration.class);
@Override
protected Framework createFramework(Map<String, Object> properties)
Added: projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/java/org/jboss/test/osgi/equinox/OSGiBootstrapTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/java/org/jboss/test/osgi/equinox/OSGiBootstrapTestCase.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/java/org/jboss/test/osgi/equinox/OSGiBootstrapTestCase.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -0,0 +1,67 @@
+/*
+ * 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.equinox;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.junit.Test;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.launch.Framework;
+
+/**
+ * Test OSGi System bundle access
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 27-Jul-2009
+ */
+public class OSGiBootstrapTestCase
+{
+ @Test
+ public void testFrameworkLaunch() throws Exception
+ {
+ OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+ Framework framework = bootProvider.getFramework();
+
+ assertEquals("BundleId == 0", 0, framework.getBundleId());
+ assertEquals("SymbolicName", "org.eclipse.osgi", framework.getSymbolicName());
+
+ framework.start();
+ try
+ {
+ BundleContext context = framework.getBundleContext();
+ ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ assertNotNull("DeployerService not null", sref);
+ }
+ finally
+ {
+ framework.stop();
+ framework.waitForStop(1000);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/java/org/jboss/test/osgi/equinox/OSGiBootstrapTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider (rev 0)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/META-INF/services/org.jboss.osgi.spi.framework.OSGiBootstrapProvider 2009-10-22 06:01:08 UTC (rev 95375)
@@ -0,0 +1 @@
+org.jboss.osgi.equinox.EquinoxBootstrapProvider # The Equinox bootstrap provider
Added: projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/jboss-osgi-framework.properties (rev 0)
+++ projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/jboss-osgi-framework.properties 2009-10-22 06:01:08 UTC (rev 95375)
@@ -0,0 +1,21 @@
+#
+# Properties read by the org.jboss.osgi.spi.framework.PropertiesBootstrapProvider
+#
+# $Id$
+#
+
+# Properties to configure the Framework
+# org.osgi.framework.storage.clean=onFirstInit
+
+# Framework bootdelegation
+# org.osgi.framework.bootdelegation=org.osgi.service.log
+
+# Extra System Packages
+# org.osgi.framework.system.packages.extra=\
+
+# Bundles that need to be installed with the Framework automatically
+# org.jboss.osgi.spi.framework.autoInstall=\
+
+# Bundles that need to be started automatically
+# org.jboss.osgi.spi.framework.autoStart=\
+
Property changes on: projects/jboss-osgi/projects/runtime/equinox/trunk/src/test/resources/jboss-osgi-framework.properties
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-22 06:01:08 UTC (rev 95375)
@@ -54,6 +54,7 @@
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
</dependency>
+
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBootstrapProvider.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -23,8 +23,9 @@
//$Id$
+import org.jboss.osgi.deployment.DeploymentServices;
import org.jboss.osgi.spi.framework.PropertiesBootstrapProvider;
-import org.osgi.framework.launch.Framework;
+import org.osgi.framework.BundleContext;
/**
* A bootstrap provider for Felix.
@@ -34,16 +35,19 @@
*/
public class FelixBootstrapProvider extends PropertiesBootstrapProvider
{
- private Framework frameworkWrapper;
+ private DeploymentServices deploymentServices;
@Override
- public Framework getFramework()
+ protected void registerSystemServices(BundleContext context)
{
- if (frameworkWrapper == null)
- {
- Framework framework = super.getFramework();
- frameworkWrapper = new FelixFrameworkWrapper(framework);
- }
- return frameworkWrapper;
+ deploymentServices = new DeploymentServices();
+ deploymentServices.start(context);
}
+
+ @Override
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ if (deploymentServices != null)
+ deploymentServices.stop(context);
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -23,17 +23,14 @@
//$Id$
-import org.jboss.osgi.deployment.internal.DeploymentServicesActivator;
import org.jboss.osgi.spi.framework.FrameworkWrapper;
-import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * The FelixFrameworkWrapper wrapps the Framework provided by the Felix implemenation.
+ * Wraps the Framework provided by the Felix implementation.
*
* @author thomas.diesler(a)jboss.com
* @since 15-Oct-2009
@@ -42,71 +39,16 @@
{
// Provide logging
final Logger log = LoggerFactory.getLogger(FelixFrameworkWrapper.class);
-
- private BundleActivator deploymentServices;
-
+
FelixFrameworkWrapper(Framework framework)
{
super(framework);
}
@Override
- public void start() throws BundleException
- {
- super.start();
-
- // Start the deployment services
- try
- {
- BundleContext context = framework.getBundleContext();
- deploymentServices = new DeploymentServicesActivator();
- deploymentServices.start(context);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (BundleException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new BundleException("Cannot start deployment services", ex);
- }
- }
-
- @Override
- public void stop() throws BundleException
- {
- // Stop the deployment services
- if (deploymentServices != null)
- {
- try
- {
- BundleContext context = framework.getBundleContext();
- deploymentServices.stop(context);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (BundleException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new BundleException("Cannot start deployment services", ex);
- }
- }
- super.stop();
- }
-
- @Override
public BundleContext getBundleContext()
{
- BundleContext context = framework.getBundleContext();
+ BundleContext context = super.getBundleContext();
return new FelixBundleContextWrapper(context);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -27,7 +27,6 @@
import static org.junit.Assert.assertNotNull;
import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.felix.FelixBundleContextWrapper;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.junit.Test;
@@ -56,8 +55,6 @@
try
{
BundleContext context = framework.getBundleContext();
- assertEquals(FelixBundleContextWrapper.class.getName(), context.getClass().getName());
-
ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
assertNotNull("DeployerService not null", sref);
}
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/test/resources/jboss-osgi-framework.properties
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/test/resources/jboss-osgi-framework.properties 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/test/resources/jboss-osgi-framework.properties 2009-10-22 06:01:08 UTC (rev 95375)
@@ -4,9 +4,6 @@
# $Id$
#
-# The OSGiFramework implementation
-org.jboss.osgi.spi.framework.impl=org.jboss.osgi.felix.framework.FelixIntegration
-
# Properties to configure the Framework
# org.osgi.framework.storage.clean=onFirstInit
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkWrapper.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkWrapper.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkWrapper.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -57,6 +57,7 @@
{
if (framework == null)
throw new IllegalArgumentException("Null framework");
+
this.framework = framework;
}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -29,7 +29,6 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Dictionary;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -46,9 +45,6 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
import org.slf4j.Logger;
@@ -130,7 +126,7 @@
// Load the framework instance
FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
final Framework frameworkImpl = factory.newFramework(props);
- framework = new FrameworkDelegate(frameworkImpl)
+ framework = new FrameworkWrapper(frameworkImpl)
{
@Override
public void start() throws BundleException
@@ -138,7 +134,7 @@
super.start();
// Get system bundle context
- BundleContext context = framework.getBundleContext();
+ BundleContext context = getBundleContext();
if (context == null)
throw new FrameworkException("Cannot obtain system context");
@@ -160,6 +156,9 @@
autoInstall.add(bundleURL);
}
+ // Register system services
+ registerSystemServices(context);
+
// Install autoInstall bundles
for (URL bundleURL : autoInstall)
{
@@ -181,11 +180,36 @@
}
}
}
+
+ @Override
+ public void stop() throws BundleException
+ {
+ // Unregister system services
+ unregisterSystemServices(getBundleContext());
+
+ super.stop();
+ }
};
configured = true;
}
+ /**
+ * Overwrite to register system services before bundles get installed.
+ */
+ protected void registerSystemServices(BundleContext context)
+ {
+ // no default system services
+ }
+
+ /**
+ * Overwrite to unregister system services before bundles get installed.
+ */
+ protected void unregisterSystemServices(BundleContext context)
+ {
+ // no default system services
+ }
+
private List<URL> getBundleURLs(Map<String, Object> props, String key)
{
String bundleList = (String)props.get(key);
@@ -321,162 +345,4 @@
return propMap;
}
-
- class FrameworkDelegate implements Framework
- {
- private Framework framework;
-
- FrameworkDelegate(Framework framework)
- {
- this.framework = framework;
- }
-
- @SuppressWarnings("unchecked")
- public Enumeration findEntries(String path, String filePattern, boolean recurse)
- {
- return framework.findEntries(path, filePattern, recurse);
- }
-
- public BundleContext getBundleContext()
- {
- return framework.getBundleContext();
- }
-
- public long getBundleId()
- {
- return framework.getBundleId();
- }
-
- public URL getEntry(String path)
- {
- return framework.getEntry(path);
- }
-
- @SuppressWarnings("unchecked")
- public Enumeration getEntryPaths(String path)
- {
- return framework.getEntryPaths(path);
- }
-
- @SuppressWarnings("unchecked")
- public Dictionary getHeaders()
- {
- return framework.getHeaders();
- }
-
- @SuppressWarnings("unchecked")
- public Dictionary getHeaders(String locale)
- {
- return framework.getHeaders(locale);
- }
-
- public long getLastModified()
- {
- return framework.getLastModified();
- }
-
- public String getLocation()
- {
- return framework.getLocation();
- }
-
- public ServiceReference[] getRegisteredServices()
- {
- return framework.getRegisteredServices();
- }
-
- public URL getResource(String name)
- {
- return framework.getResource(name);
- }
-
- @SuppressWarnings("unchecked")
- public Enumeration getResources(String name) throws IOException
- {
- return framework.getResources(name);
- }
-
- public ServiceReference[] getServicesInUse()
- {
- return framework.getServicesInUse();
- }
-
- @SuppressWarnings("unchecked")
- public Map getSignerCertificates(int signersType)
- {
- return framework.getSignerCertificates(signersType);
- }
-
- public int getState()
- {
- return framework.getState();
- }
-
- public String getSymbolicName()
- {
- return framework.getSymbolicName();
- }
-
- public Version getVersion()
- {
- return framework.getVersion();
- }
-
- public boolean hasPermission(Object permission)
- {
- return framework.hasPermission(permission);
- }
-
- public void init() throws BundleException
- {
- framework.init();
- }
-
- @SuppressWarnings("unchecked")
- public Class loadClass(String name) throws ClassNotFoundException
- {
- return framework.loadClass(name);
- }
-
- public void start() throws BundleException
- {
- framework.start();
- }
-
- public void start(int options) throws BundleException
- {
- framework.start(options);
- }
-
- public void stop() throws BundleException
- {
- framework.stop();
- }
-
- public void stop(int options) throws BundleException
- {
- framework.stop(options);
- }
-
- public void uninstall() throws BundleException
- {
- framework.uninstall();
- }
-
- public void update() throws BundleException
- {
- framework.update();
- }
-
- public void update(InputStream in) throws BundleException
- {
- framework.update(in);
- }
-
- public FrameworkEvent waitForStop(long timeout) throws InterruptedException
- {
- return framework.waitForStop(timeout);
- }
-
- }
}
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-22 06:01:08 UTC (rev 95375)
@@ -97,5 +97,4 @@
org.jboss.osgi.spi.framework.autoStart=\
file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
- file://${osgi.home}/server/minimal/deploy/jboss-osgi-deployment.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java (from rev 95358, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServices.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -0,0 +1,101 @@
+/*
+ * 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;
+
+//$Id$
+
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
+import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService;
+import org.jboss.osgi.deployment.internal.DeploymentRegistryServiceImpl;
+import org.jboss.osgi.deployment.internal.LifecycleInterceptorServiceImpl;
+import org.jboss.osgi.deployment.internal.SystemDeployerService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The deployers activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 15-Oct-2009
+ */
+public class DeploymentServices
+{
+ public void start(BundleContext context)
+ {
+ if (context == null)
+ throw new IllegalArgumentException("Null BundleContext");
+
+ // Register the DeploymentRegistryService
+ DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
+ context.registerService(DeploymentRegistryService.class.getName(), registry, null);
+
+ // Register the SystemDeployerService
+ Properties props = new Properties();
+ props.put("provider", "system");
+ final SystemDeployerService deployerService = new SystemDeployerService(context);
+ context.registerService(DeployerService.class.getName(), deployerService, props);
+
+ // Register the lifecycle interceptor related services
+ LifecycleInterceptorService service = new LifecycleInterceptorServiceImpl(context);
+ context.registerService(LifecycleInterceptorService.class.getName(), service, null);
+
+ // Track other DeployerService implementations and register as MBean
+ ServiceTracker serviceTracker = new ServiceTracker(context, DeployerService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ DeployerService service = (DeployerService)super.addingService(reference);
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ if (sref != null)
+ {
+ MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
+ deployerService.registerDeployerServiceMBean(context, mbeanServer);
+ }
+ return service;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ if (sref != null)
+ {
+ MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
+ deployerService.unregisterDeployerServiceMBean(mbeanServer);
+ }
+ super.removedService(reference, service);
+ }
+ };
+ serviceTracker.open();
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -1,102 +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.osgi.deployment.internal;
-
-//$Id$
-
-import java.util.Properties;
-
-import javax.management.MBeanServer;
-
-import org.jboss.osgi.deployment.deployer.DeployerService;
-import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
-import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The deployers activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 15-Oct-2009
- */
-public class DeploymentServicesActivator implements BundleActivator
-{
- public void start(BundleContext context) throws Exception
- {
- // Register the deployer related services
- registerDeployerService(context);
-
- // Register the lifecycle interceptor related services
- LifecycleInterceptorService service = new LifecycleInterceptorServiceImpl(context);
- context.registerService(LifecycleInterceptorService.class.getName(), service, null);
- }
-
- public void stop(BundleContext context) throws Exception
- {
- }
-
- protected void registerDeployerService(BundleContext context)
- {
- // Register the DeploymentRegistryService
- DeploymentRegistryService registry = new DeploymentRegistryServiceImpl(context);
- context.registerService(DeploymentRegistryService.class.getName(), registry, null);
-
- // Register the SystemDeployerService
- Properties props = new Properties();
- props.put("provider", "system");
- final SystemDeployerService deployerService = new SystemDeployerService(context);
- context.registerService(DeployerService.class.getName(), deployerService, props);
-
- // Track other DeployerService implementations and register as MBean
- ServiceTracker serviceTracker = new ServiceTracker(context, DeployerService.class.getName(), null)
- {
- @Override
- public Object addingService(ServiceReference reference)
- {
- DeployerService service = (DeployerService)super.addingService(reference);
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- if (sref != null)
- {
- MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- deployerService.registerDeployerServiceMBean(context, mbeanServer);
- }
- return service;
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service)
- {
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- if (sref != null)
- {
- MBeanServer mbeanServer = (MBeanServer)context.getService(sref);
- deployerService.unregisterDeployerServiceMBean(mbeanServer);
- }
- super.removedService(reference, service);
- }
- };
- serviceTracker.open();
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -281,7 +281,7 @@
return (StartLevel)startLevelTracker.getService();
}
- void registerDeployerServiceMBean(BundleContext context, MBeanServer mbeanServer)
+ public void registerDeployerServiceMBean(BundleContext context, MBeanServer mbeanServer)
{
try
{
@@ -305,7 +305,7 @@
}
}
- void unregisterDeployerServiceMBean(MBeanServer mbeanServer)
+ public void unregisterDeployerServiceMBean(MBeanServer mbeanServer)
{
try
{
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-22 05:52:07 UTC (rev 95374)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-22 06:01:08 UTC (rev 95375)
@@ -88,8 +88,8 @@
allPackages.add("org.jboss.osgi.deployment.common");
allPackages.add("org.jboss.osgi.deployment.deployer");
allPackages.add("org.jboss.osgi.deployment.interceptor");
- allPackages.add("org.jboss.osgi.deployment.scanner");
allPackages.add("org.jboss.osgi.microcontainer");
+
allPackages.add("org.jboss.virtual");
allPackages.add("org.w3c.dom");
16 years, 2 months
JBoss-OSGI SVN: r95346 - projects/jboss-osgi/trunk/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 17:39:00 -0400 (Wed, 21 Oct 2009)
New Revision: 95346
Modified:
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Give embedded felix more heap
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-21 21:38:51 UTC (rev 95345)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-21 21:39:00 UTC (rev 95346)
@@ -202,6 +202,16 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Xmx512m</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<!--
@@ -226,6 +236,16 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Xmx512m</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<!--
16 years, 2 months
JBoss-OSGI SVN: r95344 - in projects/jboss-osgi: projects/bundles/microcontainer/trunk and 9 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 17:26:54 -0400 (Wed, 21 Oct 2009)
New Revision: 95344
Modified:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixLogger.java
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
Log:
Remove version directive from deployment imports
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-21 21:26:54 UTC (rev 95344)
@@ -95,9 +95,9 @@
<Import-Package>
javax.management,
org.jboss.osgi.common.log;version=1.0,
- org.jboss.osgi.deployment.common;version=1.0,
- org.jboss.osgi.deployment.deployer;version=1.0,
- org.jboss.osgi.deployment.scanner;version=1.0,
+ org.jboss.osgi.deployment.common,
+ org.jboss.osgi.deployment.deployer,
+ org.jboss.osgi.deployment.scanner,
org.jboss.osgi.spi.service;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
org.osgi.framework,
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-21 21:26:54 UTC (rev 95344)
@@ -137,8 +137,8 @@
org.jboss.joinpoint.*,
org.jboss.logging,
org.jboss.osgi.common.log;version=1.0,
- org.jboss.osgi.deployment.common;version=1.0,
- org.jboss.osgi.deployment.deployer;version=1.0,
+ org.jboss.osgi.deployment.common,
+ org.jboss.osgi.deployment.deployer,
org.jboss.osgi.jbossxb;version=2.0,
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.management;version=1.0,
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml 2009-10-21 21:26:54 UTC (rev 95344)
@@ -101,8 +101,8 @@
javax.servlet.http,
javax.xml.parsers,
org.apache.commons.logging;version=1.1,
- org.jboss.osgi.deployment.common;version=1.0,
- org.jboss.osgi.deployment.interceptor;version=1.0,
+ org.jboss.osgi.deployment.common,
+ org.jboss.osgi.deployment.interceptor,
org.jboss.osgi.spi.capability;version=1.0,
org.jboss.virtual,
org.ops4j.pax.web.service,
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java 2009-10-21 21:26:54 UTC (rev 95344)
@@ -26,7 +26,6 @@
import java.net.MalformedURLException;
import java.net.URL;
-import org.jboss.logging.Logger;
import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.spi.framework.BundleContextWrapper;
import org.jboss.osgi.spi.util.BundleInfo;
@@ -35,6 +34,8 @@
import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.Version;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The FelixBundleContextWrapper wrapps the BundleContext provided by the Felix implemenation.
@@ -47,7 +48,7 @@
public class FelixBundleContextWrapper extends BundleContextWrapper
{
// Provide logging
- final Logger log = Logger.getLogger(FelixBundleContextWrapper.class);
+ final Logger log = LoggerFactory.getLogger(FelixBundleContextWrapper.class);
public FelixBundleContextWrapper(BundleContext context)
{
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-21 21:26:54 UTC (rev 95344)
@@ -23,13 +23,14 @@
//$Id$
-import org.jboss.logging.Logger;
import org.jboss.osgi.deployment.internal.DeploymentServicesActivator;
import org.jboss.osgi.spi.framework.FrameworkWrapper;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The FelixFrameworkWrapper wrapps the Framework provided by the Felix implemenation.
@@ -40,7 +41,7 @@
class FelixFrameworkWrapper extends FrameworkWrapper
{
// Provide logging
- final Logger log = Logger.getLogger(FelixFrameworkWrapper.class);
+ final Logger log = LoggerFactory.getLogger(FelixFrameworkWrapper.class);
private BundleActivator deploymentServices;
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixIntegration.java 2009-10-21 21:26:54 UTC (rev 95344)
@@ -25,12 +25,13 @@
import java.util.Map;
-import org.jboss.logging.Logger;
import org.jboss.osgi.spi.framework.FrameworkIntegration;
import org.jboss.osgi.spi.util.ServiceLoader;
import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
import org.osgi.framework.launch.FrameworkFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Felix specific OSGi Framework integration.
@@ -41,7 +42,7 @@
public class FelixIntegration extends FrameworkIntegration
{
// Provide logging
- final Logger log = Logger.getLogger(FelixIntegration.class);
+ final Logger log = LoggerFactory.getLogger(FelixIntegration.class);
@Override
protected Framework createFramework(Map<String, Object> properties)
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixLogger.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixLogger.java 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixLogger.java 2009-10-21 21:26:54 UTC (rev 95344)
@@ -24,8 +24,9 @@
//$Id: FelixIntegration.java 84730 2009-02-25 12:57:23Z thomas.diesler(a)jboss.com $
import org.apache.felix.moduleloader.ResourceNotFoundException;
-import org.jboss.logging.Logger;
import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* An integration with the Felix Logger.
@@ -39,7 +40,7 @@
public class FelixLogger extends org.apache.felix.framework.Logger
{
// Provide logging
- final Logger log = Logger.getLogger(FelixLogger.class);
+ final Logger log = LoggerFactory.getLogger(FelixLogger.class);
public FelixLogger()
{
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml 2009-10-21 21:26:54 UTC (rev 95344)
@@ -34,6 +34,9 @@
org.apache.log4j;version=1.2,
<!-- jboss-osgi -->
+ org.jboss.osgi.deployment.common,
+ org.jboss.osgi.deployment.deployer,
+ org.jboss.osgi.deployment.interceptor,
org.jboss.osgi.jbossxb;version=2.0,
org.jboss.osgi.microcontainer;version=1.0,
org.jboss.osgi.spi;version=1.0,
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-equinox.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -61,6 +61,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor,\
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.logging;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/conf/jboss-osgi-felix.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -22,7 +22,6 @@
org.jboss.osgi.spi.framework.autoStart=\
file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar \
- file://${osgi.home}/server/minimal/deploy/jboss-osgi-deployment.jar \
file://${osgi.home}/server/minimal/deploy/jboss-osgi-hotdeploy.jar
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -30,8 +30,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -24,8 +24,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -10,8 +10,9 @@
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
org.jboss.logging, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -30,8 +30,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-21 21:26:54 UTC (rev 95344)
@@ -76,8 +76,8 @@
org.jboss.dependency.spi*,
org.jboss.kernel.spi*,
org.jboss.osgi.common.log;version=1.0,
- org.jboss.osgi.deployment.common;version=1.0,
- org.jboss.osgi.deployment.interceptor;version=1.0,
+ org.jboss.osgi.deployment.common,
+ org.jboss.osgi.deployment.interceptor,
org.jboss.osgi.jbossxb;version=2.0,
org.jboss.osgi.microcontainer;version=1.0,
org.jboss.osgi.spi;version=1.0,
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -18,8 +18,9 @@
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
org.jboss.logging, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.logging;version=1.0, \
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-equinox.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -16,8 +16,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -20,8 +20,9 @@
org.jboss.logging, \
org.jboss.net.protocol, \
org.jboss.osgi.common.log;version=1.0, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-equinox.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -17,8 +17,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.logging;version=1.0, \
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:22:43 UTC (rev 95343)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-10-21 21:26:54 UTC (rev 95344)
@@ -16,8 +16,9 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
+ org.jboss.osgi.deployment.common, \
+ org.jboss.osgi.deployment.deployer, \
+ org.jboss.osgi.deployment.interceptor, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.logging;version=1.0, \
16 years, 2 months
JBoss-OSGI SVN: r95341 - in projects/jboss-osgi: projects/bundles/microcontainer/trunk and 16 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 16:37:52 -0400 (Wed, 21 Oct 2009)
New Revision: 95341
Removed:
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java
Modified:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/reactor/deployment/pom.xml
projects/jboss-osgi/trunk/reactor/framework/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Promote deployment to framework level
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -40,7 +40,7 @@
<!-- Properties -->
<properties>
<version.jboss.osgi.common>1.0.3-SNAPSHOT</version.jboss.osgi.common>
- <version.jboss.osgi.deployment>1.0.0-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>4.2.0</version.osgi>
</properties>
@@ -52,6 +52,11 @@
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
<!-- Bundle dependencies -->
<dependency>
@@ -60,12 +65,6 @@
<version>${version.jboss.osgi.common}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- <scope>provided</scope>
- </dependency>
<!-- OSGi Dependencies -->
<dependency>
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -42,7 +42,7 @@
<version.jboss.deployers>2.0.5.SP1</version.jboss.deployers>
<version.jboss.microcontainer>2.0.9.GA</version.jboss.microcontainer>
<version.jboss.osgi.runtime.deployers>1.0.2</version.jboss.osgi.runtime.deployers>
- <version.jboss.osgi.deployment>1.0.0-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
<version.osgi>4.2.0</version.osgi>
@@ -57,11 +57,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-xml-binding</artifactId>
<version>${version.jboss.osgi.xml.binding}</version>
</dependency>
@@ -70,6 +65,11 @@
<artifactId>jboss-osgi-deployers</artifactId>
<version>${version.jboss.osgi.runtime.deployers}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.deployers</groupId>
Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java 2009-10-21 20:37:52 UTC (rev 95341)
@@ -23,7 +23,6 @@
//$Id$
-import org.jboss.osgi.deployment.deployer.DeployerServiceCapability;
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.capability.CompendiumCapability;
import org.jboss.osgi.spi.service.MicrocontainerService;
@@ -47,7 +46,6 @@
super(MicrocontainerService.class.getName());
addDependency(new CompendiumCapability());
- addDependency(new DeployerServiceCapability());
addBundle("bundles/jboss-osgi-microcontainer.jar");
}
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -39,7 +39,7 @@
<!-- Properties -->
<properties>
- <version.jboss.osgi.deployment>1.0.0-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.ops4j.pax.web>0.7.1</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
</properties>
@@ -47,6 +47,13 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
+
+ <!-- PAX-Web -->
+ <dependency>
<groupId>org.ops4j.pax.web</groupId>
<artifactId>pax-web-api</artifactId>
<version>${version.ops4j.pax.web}</version>
@@ -57,14 +64,6 @@
<version>${version.ops4j.pax.web}</version>
</dependency>
- <!-- Bundle dependencies -->
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- <scope>provided</scope>
- </dependency>
-
<!-- OSGi Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -38,23 +38,23 @@
<properties>
<version.felix.framework>2.0.1</version.felix.framework>
- <version.jboss.osgi.deployment>1.0.0-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
</properties>
<!-- Dependencies -->
<dependencies>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>${version.felix.framework}</version>
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixFrameworkWrapper.java 2009-10-21 20:37:52 UTC (rev 95341)
@@ -24,8 +24,11 @@
//$Id$
import org.jboss.logging.Logger;
+import org.jboss.osgi.deployment.internal.DeploymentServicesActivator;
import org.jboss.osgi.spi.framework.FrameworkWrapper;
+import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;
/**
@@ -39,12 +42,67 @@
// Provide logging
final Logger log = Logger.getLogger(FelixFrameworkWrapper.class);
+ private BundleActivator deploymentServices;
+
FelixFrameworkWrapper(Framework framework)
{
super(framework);
}
@Override
+ public void start() throws BundleException
+ {
+ super.start();
+
+ // Start the deployment services
+ try
+ {
+ BundleContext context = framework.getBundleContext();
+ deploymentServices = new DeploymentServicesActivator();
+ deploymentServices.start(context);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (BundleException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new BundleException("Cannot start deployment services", ex);
+ }
+ }
+
+ @Override
+ public void stop() throws BundleException
+ {
+ // Stop the deployment services
+ if (deploymentServices != null)
+ {
+ try
+ {
+ BundleContext context = framework.getBundleContext();
+ deploymentServices.stop(context);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (BundleException ex)
+ {
+ throw ex;
+ }
+ catch (Exception ex)
+ {
+ throw new BundleException("Cannot start deployment services", ex);
+ }
+ }
+ super.stop();
+ }
+
+ @Override
public BundleContext getBundleContext()
{
BundleContext context = framework.getBundleContext();
Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/test/java/org/jboss/test/osgi/felix/OSGiBootstrapTestCase.java 2009-10-21 20:37:52 UTC (rev 95341)
@@ -24,12 +24,15 @@
//$Id$
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.felix.FelixBundleContextWrapper;
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.junit.Test;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
import org.osgi.framework.launch.Framework;
/**
@@ -54,6 +57,9 @@
{
BundleContext context = framework.getBundleContext();
assertEquals(FelixBundleContextWrapper.class.getName(), context.getClass().getName());
+
+ ServiceReference sref = context.getServiceReference(DeployerService.class.getName());
+ assertNotNull("DeployerService not null", sref);
}
finally
{
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -185,6 +185,7 @@
<include name="jboss-common-core.jar" />
<include name="jboss-logging-spi.jar" />
<include name="jboss-logging-log4j.jar" />
+ <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-spi.jar" />
<include name="jboss-vfs.jar" />
<include name="log4j.jar" />
@@ -260,9 +261,6 @@
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
<include name="org.osgi.compendium.jar" />
</fileset>
- <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
- <include name="jboss-osgi-deployment.jar" />
- </fileset>
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.metatype.jar" />
@@ -278,7 +276,6 @@
<include name="org.eclipse.osgi.jar" />
</fileset>
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="org.eclipse.osgi.services.jar" />
</fileset>
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
@@ -318,7 +315,6 @@
<include name="jboss-mdr.jar" />
<include name="jboss-metatype.jar" />
<include name="jboss-osgi-deployers.jar" />
- <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-framework.jar" />
<include name="jboss-reflect.jar" />
<include name="jbossxb.jar" />
@@ -364,6 +360,7 @@
<!-- deployers/osgi.deployer -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer" override="true">
<include name="jboss-osgi-deployers.jar" />
+ <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-spi.jar" />
</fileset>
@@ -387,7 +384,6 @@
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer"
override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-runtime-felix.jar" />
<include name="jboss-osgi-runtime-jbossas.jar" />
<include name="org.apache.felix.framework.jar" />
@@ -395,7 +391,6 @@
<singlefile condition="isFelix" src="@{deploy.artifacts.dir}/resources/jbossas/jboss-beans-felix.xml" target="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer/META-INF/jboss-osgi-jboss-beans.xml"
override="true" />
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.metatype.jar" />
</fileset>
@@ -408,7 +403,6 @@
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer"
override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="jboss-osgi-runtime-equinox.jar" />
<include name="jboss-osgi-runtime-jbossas.jar" />
<include name="org.apache.equinox.framework.jar" />
@@ -417,7 +411,6 @@
<singlefile condition="isEquinox" src="@{deploy.artifacts.dir}/resources/jbossas/jboss-beans-equinox.xml" target="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer/META-INF/jboss-osgi-jboss-beans.xml"
override="true" />
<fileset condition="isEquinox" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.metatype.jar" />
<include name="org.eclipse.osgi.services.jar" />
@@ -428,7 +421,6 @@
<fileset condition="isJBossMC" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer"
override="true">
<include name="jboss-osgi-framework.jar" />
- <include name="jboss-osgi-deployment.jar" />
</fileset>
<singlefile condition="isJBossMC" src="@{deploy.artifacts.dir}/resources/jbossas/jboss-beans-jbossmc.xml" target="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer/META-INF/jboss-osgi-jboss-beans.xml"
override="true" />
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 20:37:52 UTC (rev 95341)
@@ -30,6 +30,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 20:37:52 UTC (rev 95341)
@@ -24,6 +24,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 20:37:52 UTC (rev 95341)
@@ -10,6 +10,8 @@
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
org.jboss.logging, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 20:37:52 UTC (rev 95341)
@@ -30,6 +30,8 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
+ org.jboss.osgi.deployment.common;version=1.0, \
+ org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -140,22 +140,6 @@
<!-- jboss-osgi-common-core: no javadoc -->
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- <classifier>sources</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- <classifier>javadoc</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-hotdeploy</artifactId>
</dependency>
<dependency>
@@ -307,6 +291,22 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ <classifier>javadoc</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-runtime-jbossas</artifactId>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -54,7 +54,7 @@
<version.jboss.osgi.blueprint>1.0.0.Alpha3</version.jboss.osgi.blueprint>
<version.jboss.osgi.common>1.0.3-SNAPSHOT</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.deployment>1.0.0-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>0.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.jboss.osgi.framework>1.0.0.Alpha2</version.jboss.osgi.framework>
<version.jboss.osgi.hotdeploy>1.0.3-SNAPSHOT</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.1</version.jboss.osgi.husky>
@@ -110,11 +110,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <version>${version.jboss.osgi.deployment}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-common-core</artifactId>
<version>${version.jboss.osgi.common.core}</version>
</dependency>
@@ -172,6 +167,11 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ <version>${version.jboss.osgi.deployment}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-runtime-jbossas</artifactId>
<version>${version.jboss.osgi.runtime.jbossas}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -33,6 +33,10 @@
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ </dependency>
<!-- Provided Dependencies -->
<dependency>
Modified: projects/jboss-osgi/trunk/reactor/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -16,11 +16,11 @@
<name>JBossOSGi Deployment</name>
- <groupId>org.jboss.osgi.bundles</groupId>
+ <groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
- <packaging>bundle</packaging>
+ <packaging>jar</packaging>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.0.1-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -65,42 +65,10 @@
</dependency>
</dependencies>
+ <!-- Build -->
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.deployment.internal.DeploymentServicesActivator</Bundle-Activator>
- <Export-Package>
- org.jboss.osgi.deployment.common;version=${version},
- org.jboss.osgi.deployment.deployer;version=${version},
- org.jboss.osgi.deployment.interceptor;version=${version},
- org.jboss.osgi.deployment.scanner;version=${version},
- </Export-Package>
- <Import-Package>
- javax.management,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.util;version=1.0,
- org.jboss.virtual,
- org.osgi.framework,
- org.osgi.service.packageadmin,
- org.osgi.service.startlevel,
- org.osgi.util.tracker,
- org.slf4j
- </Import-Package>
- <Private-Package>
- org.jboss.osgi.deployment.internal
- </Private-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java 2009-10-21 20:37:52 UTC (rev 95341)
@@ -1,48 +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.osgi.deployment.deployer;
-
-//$Id$
-
-import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-
-/**
- * Adds the DeploymentService capability to the {@link OSGiRuntime}
- * under test.
- *
- * It is ignored if the {@link DeployerService} is already registered.
- *
- * Installed bundles: jboss-osgi-deployment.jar
- *
- * @author thomas.diesler(a)jboss.com
- * @since 16-Oct-2009
- */
-public class DeployerServiceCapability extends Capability
-{
- public DeployerServiceCapability()
- {
- super(DeployerService.class.getName());
-
- addBundle("bundles/jboss-osgi-deployment.jar");
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/framework/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -135,12 +135,12 @@
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployers</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-deployers</artifactId>
+ <artifactId>jboss-osgi-deployment</artifactId>
</dependency>
<!-- Provided Dependencies -->
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -19,7 +19,6 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
- <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -19,7 +19,6 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
- <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-21 20:25:46 UTC (rev 95340)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-21 20:37:52 UTC (rev 95341)
@@ -51,6 +51,10 @@
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.runtime</groupId>
+ <artifactId>jboss-osgi-deployment</artifactId>
+ </dependency>
<!-- Bundle Dependencies -->
<dependency>
@@ -115,11 +119,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-deployment</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-husky</artifactId>
<scope>provided</scope>
</dependency>
16 years, 2 months
JBoss-OSGI SVN: r95329 - in projects/jboss-osgi/trunk: distribution/installer/src/main/resources/runtime/server/conf and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 14:25:10 -0400 (Wed, 21 Oct 2009)
New Revision: 95329
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
projects/jboss-osgi/trunk/reactor/deployment/pom.xml
Log:
Fix felix runtime/jboss startup
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2009-10-21 18:25:10 UTC (rev 95329)
@@ -258,9 +258,11 @@
<include name="org.apache.felix.framework.jar" />
</fileset>
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib/org.osgi" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
- <include name="jboss-osgi-deployment.jar" />
<include name="org.osgi.compendium.jar" />
</fileset>
+ <fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/minimal/deploy" override="true">
+ <include name="jboss-osgi-deployment.jar" />
+ </fileset>
<fileset condition="isFelix" dir="@{deploy.artifacts.dir}/lib" targetdir="$INSTALL_PATH/runtime/server/all/deploy" override="true">
<include name="org.apache.felix.configadmin.jar" />
<include name="org.apache.felix.metatype.jar" />
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-all.properties 2009-10-21 18:25:10 UTC (rev 95329)
@@ -30,8 +30,6 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-default.properties 2009-10-21 18:25:10 UTC (rev 95329)
@@ -24,8 +24,6 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-minimal.properties 2009-10-21 18:25:10 UTC (rev 95329)
@@ -10,8 +10,6 @@
org.osgi.framework.system.packages.extra=\
org.apache.log4j;version=1.2, \
org.jboss.logging, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-felix-web.properties 2009-10-21 18:25:10 UTC (rev 95329)
@@ -30,8 +30,6 @@
org.apache.log4j;version=1.2, \
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.deployment.common;version=1.0, \
- org.jboss.osgi.deployment.deployer;version=1.0, \
org.jboss.osgi.spi;version=1.0, \
org.jboss.osgi.spi.capability;version=1.0, \
org.jboss.osgi.spi.framework;version=1.0, \
Modified: projects/jboss-osgi/trunk/reactor/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 18:15:16 UTC (rev 95328)
+++ projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 18:25:10 UTC (rev 95329)
@@ -76,11 +76,24 @@
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.deployment.internal.DeploymentServicesActivator</Bundle-Activator>
<Export-Package>
- org.jboss.osgi.deployment.common;version=1.0,
- org.jboss.osgi.deployment.deployer;version=1.0,
- org.jboss.osgi.deployment.interceptor;version=1.0,
- org.jboss.osgi.deployment.scanner;version=1.0,
+ org.jboss.osgi.deployment.common;version=${version},
+ org.jboss.osgi.deployment.deployer;version=${version},
+ org.jboss.osgi.deployment.interceptor;version=${version},
+ org.jboss.osgi.deployment.scanner;version=${version},
</Export-Package>
+ <Import-Package>
+ javax.management,
+ org.jboss.osgi.spi.capability;version=1.0,
+ org.jboss.osgi.spi.logging;version=1.0,
+ org.jboss.osgi.spi.management;version=1.0,
+ org.jboss.osgi.spi.util;version=1.0,
+ org.jboss.virtual,
+ org.osgi.framework,
+ org.osgi.service.packageadmin,
+ org.osgi.service.startlevel,
+ org.osgi.util.tracker,
+ org.slf4j
+ </Import-Package>
<Private-Package>
org.jboss.osgi.deployment.internal
</Private-Package>
16 years, 2 months
JBoss-OSGI SVN: r95314 - in projects/jboss-osgi/trunk: reactor/deployment and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 12:25:31 -0400 (Wed, 21 Oct 2009)
New Revision: 95314
Modified:
projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
projects/jboss-osgi/trunk/reactor/deployment/pom.xml
Log:
Fix deployment javadoc issue
Modified: projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-21 16:10:07 UTC (rev 95313)
+++ projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-21 16:25:31 UTC (rev 95314)
@@ -15,7 +15,7 @@
<include>*:jboss-osgi-apache-xerces:jar:sources</include>
<include>*:jboss-osgi-blueprint:jar:sources</include>
<include>*:jboss-osgi-common:jar:sources</include>
- <!-- include>*:jboss-osgi-deployment:jar:sources</include -->
+ <include>*:jboss-osgi-deployment:jar:sources</include>
<include>*:jboss-osgi-hotdeploy:jar:sources</include>
<include>*:jboss-osgi-husky:jar:sources</include>
<include>*:jboss-osgi-jaxb:jar:sources</include>
Modified: projects/jboss-osgi/trunk/reactor/deployment/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 16:10:07 UTC (rev 95313)
+++ projects/jboss-osgi/trunk/reactor/deployment/pom.xml 2009-10-21 16:25:31 UTC (rev 95314)
@@ -87,6 +87,29 @@
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <!-- For some reason the distribution javadoc module needs this -->
+ <file>target/${artifactId}-${version}-sources.jar</file>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
16 years, 2 months
JBoss-OSGI SVN: r95309 - projects/jboss-osgi/trunk/distribution/javadoc/scripts.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-21 11:45:49 -0400 (Wed, 21 Oct 2009)
New Revision: 95309
Modified:
projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
Log:
Disable deployment sources - no idea why this fails
Modified: projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-21 15:29:36 UTC (rev 95308)
+++ projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-21 15:45:49 UTC (rev 95309)
@@ -15,7 +15,7 @@
<include>*:jboss-osgi-apache-xerces:jar:sources</include>
<include>*:jboss-osgi-blueprint:jar:sources</include>
<include>*:jboss-osgi-common:jar:sources</include>
- <include>*:jboss-osgi-deployment:jar:sources</include>
+ <!-- include>*:jboss-osgi-deployment:jar:sources</include -->
<include>*:jboss-osgi-hotdeploy:jar:sources</include>
<include>*:jboss-osgi-husky:jar:sources</include>
<include>*:jboss-osgi-jaxb:jar:sources</include>
16 years, 2 months