[DOSGI-242] Refactor provider, Cleanup
diff --git a/cxf-dsw/bnd.bnd b/cxf-dsw/bnd.bnd
new file mode 100644
index 0000000..b0ee3dc
--- /dev/null
+++ b/cxf-dsw/bnd.bnd
@@ -0,0 +1,3 @@
+Import-Package: javax.servlet;version='[2,4)', javax.servlet.http;version='[2,4)', *
+Private-Package: org.apache.cxf.dosgi.dsw.*
+Bundle-Activator: org.apache.cxf.dosgi.dsw.osgi.Activator
diff --git a/cxf-dsw/pom.xml b/cxf-dsw/pom.xml
index 471922a..091dce9 100644
--- a/cxf-dsw/pom.xml
+++ b/cxf-dsw/pom.xml
@@ -37,26 +37,6 @@
<dependencies>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.aries.rsa</groupId>
- <artifactId>org.apache.aries.rsa.spi</artifactId>
- <version>${aries.rsa.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>${cxf.version}</version>
@@ -93,44 +73,5 @@
<version>1.0</version>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>1.7.14</version>
- <scope>test</scope>
- </dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package>
- javax.servlet*;version="[0.0,4)",
- *
- </Import-Package>
- <Export-Package>
- !*
- </Export-Package>
- <Bundle-Activator>org.apache.cxf.dosgi.dsw.Activator</Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProvider.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProvider.java
index 9069de8..638e6ca 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProvider.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProvider.java
@@ -30,7 +30,11 @@
import org.apache.aries.rsa.spi.DistributionProvider;
import org.apache.aries.rsa.spi.Endpoint;
import org.apache.aries.rsa.spi.IntentUnsatisfiedException;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.PojoConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.WsdlConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.handlers.rest.JaxRSPojoConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.dosgi.dsw.util.StringPlus;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/AbstractPojoConfigurationTypeHandler.java
similarity index 96%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/AbstractPojoConfigurationTypeHandler.java
index d2c8929..aa543e0 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/AbstractPojoConfigurationTypeHandler.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.pojo;
import java.lang.reflect.Proxy;
import java.net.URL;
@@ -30,10 +30,13 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.common.util.PackageUtils;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.qos.IntentUtils;
+import org.apache.cxf.dosgi.dsw.util.ClassUtils;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
+import org.apache.cxf.dosgi.dsw.util.ServerWrapper;
import org.apache.cxf.dosgi.dsw.util.StringPlus;
import org.apache.cxf.endpoint.AbstractEndpointFactory;
import org.apache.cxf.endpoint.Server;
@@ -193,7 +196,7 @@
addContextProperties(factory, sd, Constants.WS_CONTEXT_PROPS_PROP_KEY);
}
- static void addRsInterceptorsFeaturesProps(AbstractEndpointFactory factory, BundleContext callingContext,
+ protected static void addRsInterceptorsFeaturesProps(AbstractEndpointFactory factory, BundleContext callingContext,
Map<String, Object> sd) {
addInterceptors(factory, callingContext, sd, Constants.RS_IN_INTERCEPTORS_PROP_KEY);
addInterceptors(factory, callingContext, sd, Constants.RS_OUT_INTERCEPTORS_PROP_KEY);
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandler.java
similarity index 97%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandler.java
index bf92141..a0784fb 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandler.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.pojo;
import java.util.Map;
@@ -27,7 +27,8 @@
import org.apache.cxf.Bus;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.frontend.ServerFactoryBean;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandler.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/ServiceInvocationHandler.java
similarity index 98%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandler.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/ServiceInvocationHandler.java
index 6171a53..3928c7d 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandler.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/ServiceInvocationHandler.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.pojo;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/WsdlConfigurationTypeHandler.java
similarity index 97%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/WsdlConfigurationTypeHandler.java
index 5bf16d7..b818354 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/pojo/WsdlConfigurationTypeHandler.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.pojo;
import java.net.MalformedURLException;
import java.net.URL;
@@ -29,7 +29,8 @@
import org.apache.cxf.Bus;
import org.apache.cxf.common.util.PackageUtils;
import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.jaxb.JAXBDataBinding;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSPojoConfigurationTypeHandler.java
similarity index 96%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSPojoConfigurationTypeHandler.java
index 8f4f152..49e9d39 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSPojoConfigurationTypeHandler.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.rest;
import java.net.URL;
import java.util.List;
@@ -26,9 +26,12 @@
import org.apache.aries.rsa.spi.IntentUnsatisfiedException;
import org.apache.cxf.Bus;
import org.apache.cxf.common.util.ProxyClassLoader;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.AbstractPojoConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
+import org.apache.cxf.dosgi.dsw.util.ServerWrapper;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.apache.cxf.jaxrs.client.Client;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtils.java
similarity index 91%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtils.java
index 6e78744..c03a29f 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtils.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.rest;
import java.io.InputStream;
import java.net.URL;
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.cxf.dosgi.dsw.util.ClassUtils;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.apache.cxf.jaxrs.model.UserResource;
import org.apache.cxf.jaxrs.provider.aegis.AegisElementProvider;
@@ -57,22 +58,22 @@
})
static List<Object> getProviders(BundleContext callingContext, Map<String, Object> sd) {
List<Object> providers = new ArrayList<Object>();
- if ("aegis".equals(sd.get(org.apache.cxf.dosgi.dsw.Constants.RS_DATABINDING_PROP_KEY))) {
+ if ("aegis".equals(sd.get(org.apache.cxf.dosgi.dsw.osgi.Constants.RS_DATABINDING_PROP_KEY))) {
providers.add(new AegisElementProvider());
}
providers.addAll(ClassUtils.loadProviderClasses(callingContext,
sd,
- org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_PROP_KEY));
+ org.apache.cxf.dosgi.dsw.osgi.Constants.RS_PROVIDER_PROP_KEY));
- Object globalQueryProp = sd.get(org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_GLOBAL_PROP_KEY);
+ Object globalQueryProp = sd.get(org.apache.cxf.dosgi.dsw.osgi.Constants.RS_PROVIDER_GLOBAL_PROP_KEY);
boolean globalQueryRequired = globalQueryProp == null || OsgiUtils.toBoolean(globalQueryProp);
if (!globalQueryRequired) {
return providers;
}
boolean cxfProvidersOnly = OsgiUtils.getBooleanProperty(sd,
- org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_EXPECTED_PROP_KEY);
+ org.apache.cxf.dosgi.dsw.osgi.Constants.RS_PROVIDER_EXPECTED_PROP_KEY);
try {
ServiceReference[] refs = callingContext.getServiceReferences((String)null, PROVIDERS_FILTER);
@@ -80,7 +81,7 @@
for (ServiceReference ref : refs) {
if (!cxfProvidersOnly
|| OsgiUtils.toBoolean(ref
- .getProperty(org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_PROP_KEY))) {
+ .getProperty(org.apache.cxf.dosgi.dsw.osgi.Constants.RS_PROVIDER_PROP_KEY))) {
providers.add(callingContext.getService(ref));
}
}
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManager.java
similarity index 97%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManager.java
index eca5460..f6ebda1 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManager.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.httpservice;
import java.util.Collections;
import java.util.HashMap;
@@ -133,11 +133,11 @@
}
}
- protected String getDefaultAddress(Class<?> type) {
+ public String getDefaultAddress(Class<?> type) {
return "/" + type.getName().replace('.', '/');
}
- protected String getAbsoluteAddress(String contextRoot, String relativeEndpointAddress) {
+ public String getAbsoluteAddress(String contextRoot, String relativeEndpointAddress) {
if (relativeEndpointAddress.startsWith("http")) {
return relativeEndpointAddress;
}
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/LocalHostUtil.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/LocalHostUtil.java
similarity index 97%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/LocalHostUtil.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/LocalHostUtil.java
index 50e2127..f2fefe9 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/LocalHostUtil.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/LocalHostUtil.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.httpservice;
import java.net.InetAddress;
import java.net.NetworkInterface;
@@ -29,7 +29,7 @@
/**
* Utility methods to get the local address even on a linux host.
*/
-public final class LocalHostUtil {
+final class LocalHostUtil {
private LocalHostUtil() {
// Util Class
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContext.java
similarity index 95%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContext.java
index 7e9710b..042f2d5 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContext.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.httpservice;
import java.io.IOException;
import java.net.URL;
@@ -47,7 +47,7 @@
* be allowed until at least one {@link Filter} with a {@link #FILTER_PROP} property is registered.
* </p>
*/
-public class SecurityDelegatingHttpContext implements HttpContext {
+class SecurityDelegatingHttpContext implements HttpContext {
public static final String FILTER_PROP = "org.apache.cxf.httpservice.filter";
public static final String FILTER_REQUIRED_PROP = "org.apache.cxf.httpservice.requirefilter";
@@ -58,7 +58,7 @@
HttpContext delegate;
boolean requireFilter;
- public SecurityDelegatingHttpContext(BundleContext bundleContext, HttpContext delegate) {
+ SecurityDelegatingHttpContext(BundleContext bundleContext, HttpContext delegate) {
this.bundleContext = bundleContext;
this.delegate = delegate;
requireFilter = Boolean.TRUE.toString().equalsIgnoreCase(bundleContext.getProperty(FILTER_REQUIRED_PROP));
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Activator.java
similarity index 94%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Activator.java
index 0abcf7a..13ef30f 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Activator.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw;
+package org.apache.cxf.dosgi.dsw.osgi;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -25,7 +25,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.dosgi.dsw.handlers.CXFDistributionProvider;
-import org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
import org.apache.cxf.dosgi.dsw.qos.DefaultIntentMapFactory;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.qos.IntentManagerImpl;
@@ -73,8 +73,8 @@
private synchronized void init(Dictionary<String, Object> config) {
bus = BusFactory.newInstance().createBus();
- String httpBase = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.HTTP_BASE);
- String cxfServletAlias = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.CXF_SERVLET_ALIAS);
+ String httpBase = (String) config.get(org.apache.cxf.dosgi.dsw.osgi.Constants.HTTP_BASE);
+ String cxfServletAlias = (String) config.get(org.apache.cxf.dosgi.dsw.osgi.Constants.CXF_SERVLET_ALIAS);
IntentMap intentMap = new IntentMap(new DefaultIntentMapFactory().create());
intentTracker = new IntentTracker(bc, intentMap);
@@ -85,8 +85,8 @@
= new CXFDistributionProvider(bc, intentManager, httpServiceManager);
Dictionary<String, Object> props = new Hashtable<String, Object>();
String[] supportedIntents = intentMap.keySet().toArray(new String[] {});
- props.put("remote.intents.supported", supportedIntents);
- props.put("remote.configs.supported", cxfProvider.getSupportedTypes());
+ props.put(Constants.REMOTE_INTENTS_SUPPORTED, supportedIntents);
+ props.put(Constants.REMOTE_CONFIGS_SUPPORTED, cxfProvider.getSupportedTypes());
rsaFactoryReg = bc.registerService(DistributionProvider.class.getName(), cxfProvider, props);
}
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Constants.java
similarity index 99%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Constants.java
index 218bec6..87c2c21 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/osgi/Constants.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw;
+package org.apache.cxf.dosgi.dsw.osgi;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
index e1ceaaa..bdbe7c5 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
@@ -18,7 +18,7 @@
*/
package org.apache.cxf.dosgi.dsw.qos;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Filter;
import org.osgi.framework.InvalidSyntaxException;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
index 31b1e42..5ee288c 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
@@ -27,7 +27,7 @@
import java.util.Map;
import java.util.Set;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtils.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java
similarity index 61%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtils.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java
index cae19bd..cd1a323 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtils.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ClassUtils.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.util;
import java.util.ArrayList;
import java.util.Arrays;
@@ -36,62 +36,6 @@
private ClassUtils() {
}
- public static Class<?> getInterfaceClass(Object service, String interfaceName) {
- return getInterfaceClass(service.getClass(), interfaceName);
- }
-
- private static Class<?> getInterfaceClass(Class<?> serviceClass, String interfaceName) {
- for (Class<?> iClass : serviceClass.getInterfaces()) {
- if (iClass.getName().equals(interfaceName)) {
- return iClass;
- }
- Class<?> intf = getInterfaceClass(iClass, interfaceName);
- if (intf != null) {
- return intf;
- }
- }
-
- if (serviceClass.getName().equals(interfaceName)) {
- return serviceClass;
- }
-
- Class<?> interfaceOnProxiedClass = getInterfaceClassOnSuperClasses(serviceClass, interfaceName);
- if (interfaceOnProxiedClass != null) {
- return interfaceOnProxiedClass;
- }
-
- return null;
- }
-
- /**
- * This method tries to deal specifically with classes that might have been proxied
- * eg. CGLIB proxies of which there might be a chain of proxies as different osgi frameworks
- * might be proxying the original service class that has been registered and then proxying the proxy.
- *
- * @param serviceClass
- * @param interfaceName
- * @return
- */
- private static Class<?> getInterfaceClassOnSuperClasses(Class<?> serviceClass, String interfaceName) {
- Class<?> superClass = serviceClass.getSuperclass();
- if (superClass != null) {
- for (Class<?> iClass : superClass.getInterfaces()) {
- if (iClass.getName().equals(interfaceName)) {
- return iClass;
- }
- Class<?> intf = getInterfaceClass(iClass, interfaceName);
- if (intf != null) {
- return intf;
- }
- }
- Class<?> foundOnSuperclass = getInterfaceClassOnSuperClasses(superClass, interfaceName);
- if (foundOnSuperclass != null) {
- return foundOnSuperclass;
- }
- }
- return null;
- }
-
public static List<Object> loadProviderClasses(BundleContext callingContext,
Map<String, Object> sd, String propName) {
Object serviceProviders = sd.get(propName);
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
index 9acd0f0..be1cba0 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
@@ -23,16 +23,10 @@
import java.util.Collections;
import java.util.Map;
-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.osgi.service.remoteserviceadmin.EndpointDescription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@SuppressWarnings("deprecation")
public final class OsgiUtils {
public static final Logger LOG = LoggerFactory.getLogger(OsgiUtils.class);
@@ -81,52 +75,4 @@
return null;
}
- /**
- * Tries to retrieve the version of iClass via the PackageAdmin.
- *
- * @param iClass tThe interface for which the version should be found
- * @param bc any valid BundleContext
- * @return the version of the interface or "0.0.0" if no version information could be found or an error
- * occurred during the retrieval
- */
- public static String getVersion(Class<?> iClass, BundleContext bc) {
- ServiceReference<PackageAdmin> paRef = bc.getServiceReference(PackageAdmin.class);
- if (paRef != null) {
- PackageAdmin pa = bc.getService(paRef);
- try {
- Bundle b = pa.getBundle(iClass);
- if (b == null) {
- LOG.info("Unable to find interface version for interface " + iClass.getName()
- + ". Falling back to 0.0.0");
- return "0.0.0";
- }
- LOG.debug("Interface source bundle: {}", b.getSymbolicName());
-
- ExportedPackage[] ep = pa.getExportedPackages(b);
- LOG.debug("Exported Packages of the source bundle: {}", (Object)ep);
-
- String pack = iClass.getPackage().getName();
- LOG.debug("Looking for Package: {}", pack);
- if (ep != null) {
- for (ExportedPackage p : ep) {
- if (p != null
- && pack.equals(p.getName())) {
- LOG.debug("found package -> Version: {}", p.getVersion());
- return p.getVersion().toString();
- }
- }
- }
- } finally {
- if (pa != null) {
- bc.ungetService(paRef);
- }
- }
- } else {
- LOG.error("Was unable to obtain the package admin service -> can't resolve interface versions");
- }
-
- LOG.info("Unable to find interface version for interface " + iClass.getName()
- + ". Falling back to 0.0.0");
- return "0.0.0";
- }
}
diff --git a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServerWrapper.java b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ServerWrapper.java
similarity index 96%
rename from cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServerWrapper.java
rename to cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ServerWrapper.java
index bcc4963..d04db75 100644
--- a/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ServerWrapper.java
+++ b/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/ServerWrapper.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.util;
import java.io.IOException;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
index d9bc98d..ac3ae51 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
@@ -24,6 +24,7 @@
import junit.framework.TestCase;
import org.apache.aries.rsa.spi.DistributionProvider;
+import org.apache.cxf.dosgi.dsw.osgi.Activator;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.osgi.framework.Bundle;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProviderTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProviderTest.java
index dcf1f2d..6215f10 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProviderTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/CXFDistributionProviderTest.java
@@ -23,7 +23,11 @@
import java.util.Map;
import org.apache.aries.rsa.spi.DistributionProvider;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.PojoConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.WsdlConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.handlers.rest.JaxRSPojoConfigurationTypeHandler;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.DefaultIntentMapFactory;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.qos.IntentManagerImpl;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtilsTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtilsTest.java
index a0774be..a38fea7 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtilsTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClassUtilsTest.java
@@ -18,8 +18,6 @@
*/
package org.apache.cxf.dosgi.dsw.handlers;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
@@ -28,6 +26,7 @@
import junit.framework.TestCase;
+import org.apache.cxf.dosgi.dsw.util.ClassUtils;
import org.apache.cxf.dosgi.dsw.util.Provider;
import org.easymock.EasyMock;
import org.osgi.framework.Bundle;
@@ -35,23 +34,6 @@
public class ClassUtilsTest extends TestCase {
- public void testGetInterfaceClass() {
- assertEquals(String.class,
- ClassUtils.getInterfaceClass("Hello", "java.lang.String"));
- assertNull(ClassUtils.getInterfaceClass("Hello", "java.lang.Integer"));
- assertEquals(List.class, ClassUtils.getInterfaceClass(
- new ArrayList<String>(), "java.util.List"));
- assertEquals(Collection.class, ClassUtils.getInterfaceClass(
- new ArrayList<String>(), "java.util.Collection"));
- }
-
- public void testGetInterfaceClassFromSubclass() {
- assertEquals(Map.class, ClassUtils.getInterfaceClass(
- new MySubclassFour(), "java.util.Map"));
- assertNull(ClassUtils.getInterfaceClass(new MySubclassFour(),
- "java.util.UnknownType"));
- }
-
public void testLoadProvidersAsString() throws Exception {
BundleContext bc = mockBundleContext();
Map<String, Object> sd = Collections.<String, Object>singletonMap("providers", Provider.class.getName());
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandlerTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandlerTest.java
index 64beeac..3b909d6 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandlerTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ServiceInvocationHandlerTest.java
@@ -26,6 +26,8 @@
import java.util.List;
import java.util.Map;
+import org.apache.cxf.dosgi.dsw.handlers.pojo.ServiceInvocationHandler;
+
import junit.framework.TestCase;
public class ServiceInvocationHandlerTest extends TestCase {
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandlerTest.java
similarity index 98%
rename from cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
rename to cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandlerTest.java
index b6b05ea..678a495 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/pojo/PojoConfigurationTypeHandlerTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.pojo;
import java.util.Arrays;
import java.util.HashMap;
@@ -30,12 +30,14 @@
import org.apache.aries.rsa.spi.Endpoint;
import org.apache.aries.rsa.util.EndpointHelper;
-import org.apache.cxf.dosgi.dsw.Constants;
import org.apache.cxf.dosgi.dsw.handlers.jaxws.MyJaxWsEchoService;
import org.apache.cxf.dosgi.dsw.handlers.simple.MySimpleEchoService;
+import org.apache.cxf.dosgi.dsw.httpservice.HttpServiceManager;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.dosgi.dsw.qos.IntentManager;
import org.apache.cxf.dosgi.dsw.qos.IntentManagerImpl;
import org.apache.cxf.dosgi.dsw.qos.IntentMap;
+import org.apache.cxf.dosgi.dsw.util.ServerWrapper;
import org.apache.cxf.endpoint.AbstractEndpointFactory;
import org.apache.cxf.endpoint.EndpointImpl;
import org.apache.cxf.endpoint.Server;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtilsTest.java
similarity index 98%
rename from cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java
rename to cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtilsTest.java
index 6c8e35a..72e578b 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/rest/JaxRSUtilsTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.handlers.rest;
import java.util.HashMap;
import java.util.List;
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
import org.apache.cxf.jaxrs.provider.aegis.AegisElementProvider;
import org.easymock.EasyMock;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java
deleted file mode 100644
index fde48d2..0000000
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.dosgi.dsw.hooks;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class CxfFindListenerHookTest extends Assert {
-
- @Test
- public void testDUMMY() throws Exception {
- }
-
-// private IMocksControl control;
-//
-// @Before
-// public void setUp() {
-// control = EasyMock.createNiceControl();
-// }
-
- /* Todo this test doesn't apply at the moment since the ListenerHook doesn't
- * have a serviceReferencesRequested() API (yet).
- @Test
- public void testSyncListenerHook() throws Exception {
- Bundle bundle = control.createMock(Bundle.class);
- bundle.findEntries(EasyMock.eq("OSGI-INF/remote-service"),
- EasyMock.eq("*.xml"), EasyMock.anyBoolean());
- EasyMock.expectLastCall().andReturn(Collections.enumeration(
- Arrays.asList(getClass().getResource("/OSGI-INF/remote-service/remote-services.xml"))));
- Dictionary<String, String> bundleHeaders = new Hashtable<String, String>();
- bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_NAME,
- "Test Bundle");
- bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_VERSION,
- "1.0.0");
- bundle.getHeaders();
- EasyMock.expectLastCall().andReturn(bundleHeaders).anyTimes();
- bundle.loadClass(TestService.class.getName());
- EasyMock.expectLastCall().andReturn(TestService.class).anyTimes();
- final BundleContext requestingContext = control.createMock(BundleContext.class);
- requestingContext.getBundle();
- EasyMock.expectLastCall().andReturn(bundle).anyTimes();
-
- BundleTestContext dswContext = new BundleTestContext(bundle);
- dswContext.addServiceReference(TestService.class.getName(),
- control.createMock(ServiceReference.class));
- control.replay();
-
- CxfListenerHook hook = new CxfListenerHook(dswContext, null);
-
- // TODO : if the next call ends up being executed in a thread of its own then
- // update the test accordingly, use Futures for ex
-
- hook.serviceReferencesRequested(requestingContext,
- TestService.class.getName(), null, true);
-
- List<ServiceReference> registeredRefs = dswContext.getRegisteredReferences();
- assertNotNull(registeredRefs);
- assertEquals(1, registeredRefs.size());
- } */
-
-// @Test
-// public void testTrackerPropertiesOnlyClassInFilterWithMatchingInterface() throws Exception {
-// String filter = "(objectClass=" + TestService.class.getName() + ")";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.interfaces",
-// TestService.class.getName(),
-// asList(TestService.class.getName()),
-// Collections.EMPTY_SET);
-// }
-//
-// @Test
-// public void testTrackerPropertiesGenericFilterWithMatchingInterface() throws Exception {
-// String filter = "(&(objectClass=" + TestService.class.getName()
-// + ")(colour=blue))";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.filters",
-// replacePredicate(filter),
-// asList(TestService.class.getName()),
-// Collections.EMPTY_SET);
-// }
-//
-// @Test
-// public void testTrackerPropertiesOnlyClassInFilterWithMatchingFilter() throws Exception {
-// String filter = "(objectClass=" + TestService.class.getName() + ")";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.interfaces",
-// TestService.class.getName(),
-// Collections.EMPTY_SET,
-// asList(replacePredicate(filter)));
-// }
-//
-// @Test
-// public void testTrackerPropertiesGenericFilterWithMatchingFilter() throws Exception {
-// String filter = "(&(objectClass=" + TestService.class.getName()
-// + ")(colour=blue))";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.filters",
-// replacePredicate(filter),
-// Collections.EMPTY_SET,
-// asList(replacePredicate(filter)));
-// }
-//
-// @Test
-// public void testTrackerPropertiesOnlyClassInFilterWithMatchingBoth() throws Exception {
-// String filter = "(objectClass=" + TestService.class.getName() + ")";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.interfaces",
-// TestService.class.getName(),
-// asList(TestService.class.getName()),
-// asList(replacePredicate(filter)));
-// }
-//
-// @Test
-// public void testTrackerPropertiesGenericFilterWithMatchingBoth() throws Exception {
-// String filter = "(&(objectClass=" + TestService.class.getName()
-// + ")(colour=blue))";
-// doTestTrackerPropertiesSet(filter,
-// "osgi.remote.discovery.interest.filters",
-// replacePredicate(filter),
-// Collections.EMPTY_SET,
-// asList(replacePredicate(filter)));
-// }
-//
-// private void doTestTrackerPropertiesSet(final String filter,
-// String propKey,
-// String propValue,
-// Collection matchingInterfaces,
-// Collection matchingFilters) throws Exception {
-// Bundle bundle = control.createMock(Bundle.class);
-// Dictionary<String, String> bundleHeaders = new Hashtable<String, String>();
-// bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_NAME,
-// "Test Bundle");
-// bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_VERSION,
-// "1.0.0");
-// bundle.getHeaders();
-// EasyMock.expectLastCall().andReturn(bundleHeaders).times(2);
-// final String serviceClass = TestService.class.getName();
-// bundle.loadClass(serviceClass);
-// EasyMock.expectLastCall().andReturn(TestService.class).times(2);
-// final BundleContext requestingContext = control.createMock(BundleContext.class);
-//
-// BundleTestContext dswContext = new BundleTestContext(bundle);
-// ServiceRegistration serviceRegistration = control.createMock(ServiceRegistration.class);
-// dswContext.addServiceRegistration(serviceClass, serviceRegistration);
-// serviceRegistration.unregister();
-// EasyMock.expectLastCall().times(1);
-// ServiceReference serviceReference = control.createMock(ServiceReference.class);
-// dswContext.addServiceReference(serviceClass, serviceReference);
-//
-// final String trackerClass = DiscoveredServiceTracker.class.getName();
-// ServiceRegistration trackerRegistration = control.createMock(ServiceRegistration.class);
-// dswContext.addServiceRegistration(trackerClass, trackerRegistration);
-// ServiceReference trackerReference = control.createMock(ServiceReference.class);
-// dswContext.addServiceReference(trackerClass, trackerReference);
-//
-// List property = asList(propValue);
-// Dictionary properties = new Hashtable();
-// properties.put(propKey, property);
-// trackerRegistration.setProperties(properties);
-// EasyMock.expectLastCall();
-//
-// if (matchingInterfaces.size() == 0 && matchingFilters.size() > 0) {
-// Iterator filters = matchingFilters.iterator();
-// while (filters.hasNext()) {
-// Filter f = control.createMock(Filter.class);
-// dswContext.addFilter((String)filters.next(), f);
-// f.match(EasyMock.isA(Dictionary.class));
-// EasyMock.expectLastCall().andReturn(true);
-// }
-// }
-//
-// control.replay();
-//
-// CxfFindListenerHook hook = new CxfFindListenerHook(dswContext, null);
-//
-// ListenerHook.ListenerInfo info = new ListenerHook.ListenerInfo() {
-// public BundleContext getBundleContext() {
-// return requestingContext;
-// }
-//
-// public String getFilter() {
-// return filter;
-// }
-//
-// public boolean isRemoved() {
-// return false;
-// }
-// };
-// hook.added(Collections.singleton(info));
-//
-// DiscoveredServiceTracker tracker = (DiscoveredServiceTracker)
-// dswContext.getService(trackerReference);
-// assertNotNull(tracker);
-//
-// Collection interfaces = asList(serviceClass);
-//
-// notifyAvailable(tracker, matchingInterfaces, matchingFilters, "1234");
-// notifyAvailable(tracker, matchingInterfaces, matchingFilters, "5678");
-// notifyAvailable(tracker, matchingInterfaces, matchingFilters, "1234");
-//
-// notifyUnAvailable(tracker, "1234");
-// notifyUnAvailable(tracker, "5678");
-//
-// notifyAvailable(tracker, matchingInterfaces, matchingFilters , "1234");
-//
-// control.verify();
-//
-// Map<String, ServiceReference> registeredRefs = dswContext.getRegisteredReferences();
-// assertNotNull(registeredRefs);
-// assertEquals(2, registeredRefs.size());
-// assertNotNull(registeredRefs.get(serviceClass));
-// assertSame(serviceReference, registeredRefs.get(serviceClass));
-//
-// Map<String, ServiceRegistration> registeredRegs = dswContext.getRegisteredRegistrations();
-// assertNotNull(registeredRegs);
-// assertEquals(2, registeredRegs.size());
-// assertNotNull(registeredRegs.get(trackerClass));
-// assertSame(trackerRegistration, registeredRegs.get(trackerClass));
-//
-// List<Object> registeredServices = dswContext.getRegisteredServices();
-// assertNotNull(registeredServices);
-// assertEquals(2, registeredServices.size());
-// }
-//
-// @Test
-// public void testConstructorAndGetters() {
-// BundleContext bc = control.createMock(BundleContext.class);
-// CxfRemoteServiceAdmin dp = control.createMock(CxfRemoteServiceAdmin.class);
-// control.replay();
-//
-// CxfFindListenerHook clh = new CxfFindListenerHook(bc, dp);
-// assertSame(bc, clh.getContext());
-// assertSame(dp, clh.getDistributionProvider());
-// }
-//
-// @Test
-// public void testFindHook() {
-// BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
-//
-// final List<String> lookupCalls = new ArrayList<String>();
-// CxfFindListenerHook fh = new CxfFindListenerHook(bc, null) {
-// @Override
-// protected synchronized void lookupDiscoveryService(
-// String interfaceName, String filterValue) {
-// lookupCalls.add(interfaceName);
-// lookupCalls.add(filterValue);
-// }
-// };
-//
-// String clazz = "my.app.Class";
-// String filter = "&(A=B)(C=D)";
-// fh.find(null, clazz, filter, true, null);
-//
-// assertEquals(Arrays.asList(clazz, filter), lookupCalls);
-// }
-//
-// private void notifyAvailable(DiscoveredServiceTracker tracker,
-// Collection interfaces,
-// Collection filters,
-// String endpointId) {
-// Map<String, Object> props = new Hashtable<String, Object>();
-// props.put("osgi.remote.interfaces", "*");
-// props.put("osgi.remote.endpoint.id", endpointId);
-// tracker.serviceChanged(new Notification(AVAILABLE,
-// TestService.class.getName(),
-// interfaces,
-// filters,
-// props));
-// }
-//
-// private void notifyUnAvailable(DiscoveredServiceTracker tracker,
-// String endpointId) {
-// Map<String, Object> props = new Hashtable<String, Object>();
-// props.put("osgi.remote.endpoint.id", endpointId);
-// tracker.serviceChanged(new Notification(UNAVAILABLE,
-// TestService.class.getName(),
-// Collections.EMPTY_SET,
-// Collections.EMPTY_SET,
-// props));
-// }
-//
-// private List<String> asList(String s) {
-// List l = new ArrayList<String>();
-// l.add(s);
-// return l;
-// }
-//
-// private String replacePredicate(String filter) {
-// return filter.replace("objectClass", ServicePublication.SERVICE_INTERFACE_NAME);
-// }
-//
-// private class Notification implements DiscoveredServiceNotification {
-// private int type;
-// private ServiceEndpointDescription sed;
-// private Collection interfaces;
-// private Collection filters;
-//
-// Notification(int type,
-// String interfaceName,
-// Collection interfaces,
-// Collection filters,
-// Map<String, Object> props) {
-// this.type = type;
-// this.sed = new ServiceEndpointDescriptionImpl(interfaceName, props);
-// this.interfaces = interfaces;
-// this.filters = filters;
-// }
-//
-// public int getType() {
-// return type;
-// }
-//
-// public ServiceEndpointDescription getServiceEndpointDescription() {
-// return sed;
-// }
-//
-// public Collection getInterfaces() {
-// return interfaces;
-// }
-//
-// public Collection getFilters() {
-// return filters;
-// }
-// }
-}
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java
deleted file mode 100644
index 40b40c5..0000000
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.dosgi.dsw.hooks;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class CxfPublishHookTest extends Assert {
-
- @Test
- public void testDUMMY() throws Exception {
- }
-
- //
- // private IMocksControl control;
- //
- // @Before
- // public void setUp() {
- // control = EasyMock.createNiceControl();
- // }
- //
- // @Test
- // public void testPublishSingleInterface() throws Exception {
- // String[] serviceNames = new String[]{TestService.class.getName()};
- // String[] addresses = new String[]{"http://localhost:9000/hello"};
- // doTestPublishHook("remote-services.xml", serviceNames, addresses);
- // }
- //
- // @Test
- // public void testPublishSingleInterfaceAltFormat() throws Exception {
- // String[] serviceNames = new String[]{TestService.class.getName()};
- // String[] addresses = new String[]{"http://localhost:9000/hello"};
- // doTestPublishHook("alt-remote-services.xml", serviceNames, addresses);
- // }
- //
- // @Test
- // public void testPublishMultiInterface() throws Exception {
- // String[] serviceNames = new String[]{TestService.class.getName(),
- // AdditionalInterface.class.getName()};
- // String[] addresses = new String[]{"http://localhost:9001/hello",
- // "http://localhost:9002/hello"};
- // doTestPublishHook("multi-services.xml", serviceNames, addresses);
- // }
- //
- // @SuppressWarnings("unchecked")
- // private void doTestPublishHook(String remoteServices,
- // String[] serviceNames,
- // String[] addresses) throws Exception {
- //
- // Bundle bundle = control.createMock(Bundle.class);
- // bundle.findEntries(EasyMock.eq("OSGI-INF/remote-service"),
- // EasyMock.eq("*.xml"), EasyMock.anyBoolean());
- // EasyMock.expectLastCall().andReturn(Collections.enumeration(
- // Arrays.asList(getClass().getResource("/OSGI-INF/remote-service/" + remoteServices))));
- // Dictionary<String, String> bundleHeaders = new Hashtable<String, String>();
- // bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_NAME,
- // "Test Bundle");
- // bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_VERSION,
- // "1.0.0");
- // bundle.getHeaders();
- // EasyMock.expectLastCall().andReturn(bundleHeaders).anyTimes();
- // BundleContext requestingContext = control.createMock(BundleContext.class);
- // bundle.getBundleContext();
- // EasyMock.expectLastCall().andReturn(requestingContext).anyTimes();
- //
- // TestService serviceObject = new TestServiceImpl();
- // Dictionary serviceProps = new Hashtable();
- //
- // ServiceReference sref = control.createMock(ServiceReference.class);
- // sref.getBundle();
- // EasyMock.expectLastCall().andReturn(bundle).anyTimes();
- // sref.getProperty(Constants.OBJECTCLASS);
- // EasyMock.expectLastCall().andReturn(serviceNames).anyTimes();
- // sref.getPropertyKeys();
- // EasyMock.expectLastCall().andReturn(new String[]{}).anyTimes();
- //
- // BundleTestContext dswContext = new BundleTestContext(bundle);
- //
- // ServiceRegistration[] serviceRegistrations =
- // new ServiceRegistration[serviceNames.length];
- //
- // for (int i = 0; i < serviceNames.length ; i++) {
- // serviceRegistrations[i] =
- // control.createMock(ServiceRegistration.class);
- // dswContext.addServiceRegistration(serviceNames[i],
- // serviceRegistrations[i]);
- // dswContext.addServiceReference(serviceNames[i], sref);
- // }
- // dswContext.registerService(serviceNames, serviceObject, serviceProps);
- //
- // Server server = control.createMock(Server.class);
- //
- // String publicationClass = ServicePublication.class.getName();
- // ServiceRegistration publicationRegistration =
- // control.createMock(ServiceRegistration.class);
- // publicationRegistration.unregister();
- // EasyMock.expectLastCall().times(serviceNames.length);
- // dswContext.addServiceRegistration(publicationClass, publicationRegistration);
- // ServiceReference publicationReference =
- // control.createMock(ServiceReference.class);
- // dswContext.addServiceReference(publicationClass, publicationReference);
- // control.replay();
- //
- // TestPublishHook hook = new TestPublishHook(dswContext,
- // serviceObject,
- // server);
- // hook.publishEndpoint(sref);
- // hook.verify();
- //
- // assertEquals(1, hook.getEndpoints().size());
- // List<EndpointInfo> list = hook.getEndpoints().get(sref);
- // assertNotNull(list);
- // assertEquals(serviceNames.length, list.size());
- // for (int i = 0; i < serviceNames.length; i++) {
- // assertNotNull(list.get(i));
- // ServiceEndpointDescription sd = list.get(i).getServiceDescription();
- // assertNotNull(sd);
- // assertNotNull(sd.getProvidedInterfaces());
- // assertEquals(1, sd.getProvidedInterfaces().size());
- // Collection names = sd.getProvidedInterfaces();
- // assertEquals(1, names.size());
- // assertEquals(serviceNames[i], names.toArray()[0]);
- // String excludeProp = "osgi.remote.interfaces";
- // assertNull(sd.getProperties().get(excludeProp));
- // String addrProp =
- // org.apache.cxf.dosgi.dsw.Constants.WS_ADDRESS_PROPERTY_OLD;
- // assertEquals(addresses[i], sd.getProperties().get(addrProp));
- // }
- //
- // Map<String, ServiceRegistration> registeredRegs =
- // dswContext.getRegisteredRegistrations();
- // assertNotNull(registeredRegs);
- // assertEquals(serviceNames.length + 1, registeredRegs.size());
- // assertNotNull(registeredRegs.get(publicationClass));
- // assertSame(publicationRegistration, registeredRegs.get(publicationClass));
- //
- // Map<String, List<Dictionary>> registeredProps =
- // dswContext.getRegisteredProperties();
- // assertNotNull(registeredProps);
- // assertEquals(serviceNames.length + 1, registeredProps.size());
- // assertNotNull(registeredProps.get(publicationClass));
- // List<Dictionary> propsList = registeredProps.get(publicationClass);
- // assertEquals(serviceNames.length, propsList.size());
- // for (Dictionary props : propsList) {
- // Collection interfaces =
- // (Collection)props.get(SERVICE_INTERFACE_NAME);
- // assertNotNull(interfaces);
- // assertTrue(interfaces.contains(TestService.class.getName())
- // || interfaces.contains(AdditionalInterface.class.getName()));
- // }
- //
- // hook.removeEndpoints();
- //
- // control.verify();
- // }
- //
- // @SuppressWarnings("unchecked")
- // @Test
- // public void testPublishMultipleTimes() {
- // Bundle bundle = control.createMock(Bundle.class);
- // bundle.findEntries(EasyMock.eq("OSGI-INF/remote-service"),
- // EasyMock.eq("*.xml"), EasyMock.anyBoolean());
- // EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
- // public Object answer() throws Throwable {
- // return Collections.enumeration(Arrays.asList(
- // getClass().getResource("/OSGI-INF/remote-service/remote-services.xml")));
- // }
- // }).anyTimes();
- // Dictionary<String, String> bundleHeaders = new Hashtable<String, String>();
- // bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_NAME,
- // "org.apache.cxf.example.bundle");
- // bundleHeaders.put(org.osgi.framework.Constants.BUNDLE_VERSION,
- // "1.0.0");
- // bundle.getHeaders();
- // EasyMock.expectLastCall().andReturn(bundleHeaders).anyTimes();
- // BundleContext requestingContext = control.createMock(BundleContext.class);
- // bundle.getBundleContext();
- // EasyMock.expectLastCall().andReturn(requestingContext).anyTimes();
- //
- // TestService serviceObject = new TestServiceImpl();
- // Dictionary serviceProps = new Hashtable();
- //
- // ServiceReference sref = control.createMock(ServiceReference.class);
- // sref.getBundle();
- // EasyMock.expectLastCall().andReturn(bundle).anyTimes();
- // sref.getProperty(Constants.OBJECTCLASS);
- // String[] serviceNames = {TestService.class.getName()};
- // EasyMock.expectLastCall().andReturn(serviceNames).anyTimes();
- // sref.getPropertyKeys();
- // EasyMock.expectLastCall().andReturn(new String[]{}).anyTimes();
- //
- // BundleTestContext dswContext = new BundleTestContext(bundle);
- // ServiceRegistration[] serviceRegistrations =
- // new ServiceRegistration[serviceNames.length];
- // for (int i = 0; i < serviceNames.length ; i++) {
- // serviceRegistrations[i] =
- // control.createMock(ServiceRegistration.class);
- // dswContext.addServiceRegistration(serviceNames[i],
- // serviceRegistrations[i]);
- // dswContext.addServiceReference(serviceNames[i], sref);
- // }
- // dswContext.registerService(serviceNames, serviceObject, serviceProps);
- //
- // final Server server = control.createMock(Server.class);
- // control.replay();
- //
- // CxfPublishHook hook = new CxfPublishHook(dswContext, null) {
- // @Override
- // Server createServer(ServiceReference sref, ServiceEndpointDescription sd) {
- // return server;
- // }
- // };
- // assertNull("Precondition not met", hook.getEndpoints().get(sref));
- // hook.publishEndpoint(sref);
- // assertEquals(1, hook.getEndpoints().get(sref).size());
- //
- // hook.endpoints.put(sref, new ArrayList<EndpointInfo>());
- // assertEquals("Precondition failed", 0, hook.getEndpoints().get(sref).size());
- // hook.publishEndpoint(sref);
- // assertEquals(0, hook.getEndpoints().get(sref).size());
- //
- // control.verify();
- // }
- //
- // private static class TestPublishHook extends CxfPublishHook {
- //
- // private boolean called;
- // private TestService serviceObject;
- // private Server server;
- //
- // public TestPublishHook(BundleContext bc, TestService serviceObject,
- // Server s) {
- // super(bc, null);
- // this.serviceObject = serviceObject;
- // this.server = s;
- // }
- //
- // @Override
- // protected ConfigurationTypeHandler getHandler(ServiceEndpointDescription sd,
- // Map<String, Object> props) {
- // return new ConfigurationTypeHandler() {
- // public String getType() {
- // return "test";
- // }
- //
- // public Object createProxy(ServiceReference sr,
- // BundleContext dswContext, BundleContext callingContext,
- // Class<?> iClass, ServiceEndpointDescription sd) {
- // throw new UnsupportedOperationException();
- // }
- //
- // public Server createServer(ServiceReference sr,
- // BundleContext dswContext, BundleContext callingContext,
- // ServiceEndpointDescription sd, Class<?> iClass, Object serviceBean) {
- // Assert.assertSame(serviceBean, serviceObject);
- // TestPublishHook.this.setCalled();
- // Map props = sd.getProperties();
- // String address = (String)props.get(WS_ADDRESS_PROPERTY);
- // if (address != null) {
- // props.put(ENDPOINT_LOCATION, address);
- // }
- // return server;
- // }
- //
- // };
- // }
- //
- // public void setCalled() {
- // called = true;
- // }
- //
- // public void verify() {
- // Assert.assertTrue(called);
- // }
- // }
- //
- // public interface AdditionalInterface {
- // }
- //
- // private static class TestServiceImpl implements TestService, AdditionalInterface {
- //
- // }
-}
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java
deleted file mode 100644
index c004702..0000000
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.dosgi.dsw.hooks;
-
-import junit.framework.TestCase;
-
-public class ServiceHookUtilsTest extends TestCase {
-
- public void testDUMMY() {
- assertTrue(true);
- }
-
-/*
- public void testCreateServer() {
- IMocksControl control = EasyMock.createNiceControl();
-
- Server srvr = control.createMock(Server.class);
- ServiceReference serviceReference = control.createMock(ServiceReference.class);
- BundleContext dswContext = control.createMock(BundleContext.class);
- BundleContext callingContext = control.createMock(BundleContext.class);
- ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("java.lang.String");
- Object service = "hi";
-
- ConfigurationTypeHandler handler = control.createMock(ConfigurationTypeHandler.class);
- handler.createServer(serviceReference, dswContext, callingContext, sd, String.class, service);
- EasyMock.expectLastCall().andReturn(srvr);
- control.replay();
-
- assertSame(srvr,
- ServiceHookUtils.createServer(handler, serviceReference, dswContext, callingContext, sd, service));
- }
-
- public void testNoServerWhenNoInterfaceSpecified() {
- IMocksControl control = EasyMock.createNiceControl();
-
- Server srvr = control.createMock(Server.class);
- ServiceReference serviceReference = control.createMock(ServiceReference.class);
- BundleContext dswContext = control.createMock(BundleContext.class);
- BundleContext callingContext = control.createMock(BundleContext.class);
- ServiceEndpointDescription sd = mockServiceDescription(control, "Foo");
- Object service = "hi";
-
- ConfigurationTypeHandler handler = control.createMock(ConfigurationTypeHandler.class);
- handler.createServer(serviceReference, dswContext, callingContext, sd, String.class, service);
- EasyMock.expectLastCall().andReturn(srvr);
- control.replay();
-
- assertNull(ServiceHookUtils.createServer(handler, serviceReference, dswContext,
- callingContext, sd, service));
- }
-
- public void testPublish() throws Exception {
- Map<String, Object> props = new HashMap<String, Object>();
- props.put("foo", "bar");
- props.put(ServicePublication.ENDPOINT_LOCATION, "http:localhost/xyz");
- ServiceEndpointDescriptionImpl sed = new ServiceEndpointDescriptionImpl(String.class.getName(), props);
- assertEquals(new URI("http:localhost/xyz"), sed.getLocation());
-
- final Dictionary<String, Object> expectedProps = new Hashtable<String, Object>();
- expectedProps.put(ServicePublication.SERVICE_PROPERTIES, props);
- expectedProps.put(ServicePublication.SERVICE_INTERFACE_NAME, Collections.singleton(String.class.getName()));
- expectedProps.put(ServicePublication.ENDPOINT_LOCATION, new URI("http:localhost/xyz"));
-
- BundleContext bc = EasyMock.createMock(BundleContext.class);
- EasyMock.expect(bc.registerService(
- EasyMock.eq(ServicePublication.class.getName()),
- EasyMock.anyObject(),
- (Dictionary<?, ?>) EasyMock.anyObject()))
- .andAnswer(new IAnswer<ServiceRegistration>() {
- public ServiceRegistration answer() throws Throwable {
- assertTrue(EasyMock.getCurrentArguments()[1] instanceof ServicePublication);
- Dictionary<?, ?> actualProps =
- (Dictionary<?, ?>) EasyMock.getCurrentArguments()[2];
- UUID uuid = UUID.fromString(actualProps.get(ServicePublication.ENDPOINT_SERVICE_ID)
- .toString());
- expectedProps.put(ServicePublication.ENDPOINT_SERVICE_ID, uuid.toString());
- assertEquals(expectedProps, actualProps);
- return EasyMock.createMock(ServiceRegistration.class);
- }
- });
- EasyMock.replay(bc);
-
- ServiceHookUtils.publish(bc, null, sed);
- EasyMock.verify(bc);
- }
-
- private ServiceEndpointDescription mockServiceDescription(IMocksControl control,
- String... interfaceNames) {
- List<String> iList = new ArrayList<String>();
- for (String iName : interfaceNames) {
- iList.add(iName);
- }
- ServiceEndpointDescription sd = control.createMock(ServiceEndpointDescription.class);
- sd.getProvidedInterfaces();
- EasyMock.expectLastCall().andReturn(iList);
- return sd;
- }
-*/
-}
-
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/TestService.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/TestService.java
deleted file mode 100644
index 07b5088..0000000
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/TestService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.dosgi.dsw.hooks;
-
-public interface TestService {
-}
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManagerTest.java
similarity index 98%
rename from cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
rename to cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManagerTest.java
index 10fba12..593a06d 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/HttpServiceManagerTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.httpservice;
import java.util.Dictionary;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContextTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContextTest.java
similarity index 99%
rename from cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContextTest.java
rename to cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContextTest.java
index 58b5f58..84718ad 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContextTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/httpservice/SecurityDelegatingHttpContextTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.dosgi.dsw.handlers;
+package org.apache.cxf.dosgi.dsw.httpservice;
import java.io.PrintWriter;
import java.net.URL;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java
index b68cf61..380478c 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java
@@ -18,7 +18,7 @@
*/
package org.apache.cxf.dosgi.dsw.qos;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.apache.cxf.feature.AbstractFeature;
import org.easymock.Capture;
import org.easymock.EasyMock;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentUtilsTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentUtilsTest.java
index f7fe844..ad04be0 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentUtilsTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentUtilsTest.java
@@ -25,7 +25,7 @@
import java.util.Map;
import java.util.Set;
-import org.apache.cxf.dosgi.dsw.Constants;
+import org.apache.cxf.dosgi.dsw.osgi.Constants;
import org.junit.Assert;
import org.junit.Test;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
diff --git a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/util/OsgiUtilsTest.java b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/util/OsgiUtilsTest.java
index cc15ea6..f20f878 100644
--- a/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/util/OsgiUtilsTest.java
+++ b/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/util/OsgiUtilsTest.java
@@ -25,20 +25,11 @@
import java.util.List;
import java.util.Map;
-import junit.framework.TestCase;
-
-import org.easymock.EasyMock;
-import org.easymock.IMocksControl;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
-import org.osgi.service.packageadmin.ExportedPackage;
-import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.remoteserviceadmin.EndpointDescription;
import org.osgi.service.remoteserviceadmin.RemoteConstants;
-@SuppressWarnings("deprecation")
+import junit.framework.TestCase;
+
public class OsgiUtilsTest extends TestCase {
public void testMultiValuePropertyAsString() {
@@ -63,79 +54,6 @@
assertNull(OsgiUtils.getMultiValueProperty(null));
}
- @SuppressWarnings({
- "rawtypes", "unchecked"
- })
- public void testGetVersion() {
- IMocksControl c = EasyMock.createNiceControl();
- BundleContext bc = c.createMock(BundleContext.class);
- ServiceReference sref = c.createMock(ServiceReference.class);
- PackageAdmin pa = c.createMock(PackageAdmin.class);
- Bundle b = c.createMock(Bundle.class);
-
- EasyMock.expect(bc.getServiceReference(EasyMock.eq(PackageAdmin.class))).andReturn(sref);
- EasyMock.expect(bc.getService(EasyMock.eq(sref))).andReturn(pa);
-
- Class<?> iClass = CharSequence.class;
-
- c.replay();
- // version 0.0.0 because of missing bundle
-
- assertEquals("0.0.0", OsgiUtils.getVersion(iClass, bc));
-
- c.verify();
- c.reset();
- // version 1.2.3
-
- EasyMock.expect(bc.getServiceReference(EasyMock.eq(PackageAdmin.class))).andReturn(sref);
- EasyMock.expect(bc.getService(EasyMock.eq(sref))).andReturn(pa);
- EasyMock.expect(pa.getBundle(EasyMock.eq(iClass))).andReturn(b);
-
- ExportedPackage[] exP = new ExportedPackage[] {new MyExportedPackage(iClass.getPackage(), "1.2.3"),
- new MyExportedPackage(String.class.getPackage(), "4.5.6") };
-
- EasyMock.expect(pa.getExportedPackages(EasyMock.eq(b))).andReturn(exP).atLeastOnce();
-
- c.replay();
- assertEquals("1.2.3", OsgiUtils.getVersion(iClass, bc));
- c.verify();
- }
-
- private static class MyExportedPackage implements ExportedPackage {
-
- Package package1;
- String version;
-
- MyExportedPackage(Package package1, String version) {
- this.package1 = package1;
- this.version = version;
- }
-
- public Bundle getExportingBundle() {
- return null;
- }
-
- public Bundle[] getImportingBundles() {
- return null;
- }
-
- public String getName() {
- return package1.getName();
- }
-
- public String getSpecificationVersion() {
- return null;
- }
-
- public Version getVersion() {
- return new Version(version);
- }
-
- public boolean isRemovalPending() {
- return false;
- }
- }
-
public void testGetProperty() {
Map<String, Object> p = new HashMap<String, Object>();
p.put(RemoteConstants.ENDPOINT_ID, "http://google.de");
diff --git a/decorator/bnd.bnd b/decorator/bnd.bnd
new file mode 100644
index 0000000..499a137
--- /dev/null
+++ b/decorator/bnd.bnd
@@ -0,0 +1,3 @@
+Private-Package: org.apache.cxf.dosgi.dsw.decorator
+Bundle-Activator: org.apache.cxf.dosgi.dsw.decorator.Activator
+Export-Package: org.apache.cxf.xmlns.service_decoration._1_0
\ No newline at end of file
diff --git a/decorator/pom.xml b/decorator/pom.xml
index af14af3..e894925 100644
--- a/decorator/pom.xml
+++ b/decorator/pom.xml
@@ -35,76 +35,6 @@
<topDirectoryLocation>..</topDirectoryLocation>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.aries.rsa</groupId>
- <artifactId>org.apache.aries.rsa.spi</artifactId>
- <version>${aries.rsa.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-core</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-databinding-aegis</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-providers</artifactId>
- <version>${cxf.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>1.7.14</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
@@ -119,20 +49,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Export-Package>
- !*
- </Export-Package>
- <Bundle-Activator>org.apache.cxf.dosgi.dsw.decorator.Activator</Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
</plugins>
</build>
</project>
diff --git a/felix/pom.xml b/felix/pom.xml
deleted file mode 100644
index 0b8b759..0000000
--- a/felix/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<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>
- <artifactId>cxf-dosgi-ri-felix</artifactId>
- <packaging>pom</packaging>
- <name>Distributed OSGi Temporary Private Felix Framework Build</name>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <topDirectoryLocation>..</topDirectoryLocation>
- </properties>
-
- <modules>
- <module>shell.tui</module>
- <module>profiles</module>
- </modules>
-
-</project>
diff --git a/felix/profiles/pom.xml b/felix/profiles/pom.xml
deleted file mode 100644
index 4cc71fe..0000000
--- a/felix/profiles/pom.xml
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<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>
- <artifactId>cxf-dosgi-ri-felix-profiles</artifactId>
- <packaging>jar</packaging>
- <name>Distributed OSGi Felix Profiles</name>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <topDirectoryLocation>../..</topDirectoryLocation>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>${jetty.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
- <version>${servicemix.specs.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
- <version>${servicemix.specs.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxws-api-2.1</artifactId>
- <version>${servicemix.specs.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId>
- <version>${servicemix.specs.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
- <version>1.1.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_3.0_spec</artifactId>
- <version>1.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-annotation_1.0_spec</artifactId>
- <version>1.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ws.xmlschema</groupId>
- <artifactId>xmlschema-core</artifactId>
- <version>${xmlschema.bundle.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
- <version>${xmlresolver.bundle.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- <version>${neethi.bundle.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
- <version>${wsdl4j.bundle.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.santuario</groupId>
- <artifactId>xmlsec</artifactId>
- <version>${xmlsec.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- <version>${jaxbimpl.bundle.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.asm</artifactId>
- <version>${asm.bundle.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- <version>${woodstox.bundle.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.osgi</groupId>
- <artifactId>spring-osgi-core</artifactId>
- <version>${spring.osgi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.osgi</groupId>
- <artifactId>spring-osgi-io</artifactId>
- <version>${spring.osgi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.osgi</groupId>
- <artifactId>spring-osgi-extender</artifactId>
- <version>${spring.osgi.version}</version>
- </dependency>
-
- <!-- for maven filtering to happen -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources/</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </build>
-
-</project>
diff --git a/felix/profiles/resources/OSGI-INF/remote-service/alt-remote-services.xml b/felix/profiles/resources/OSGI-INF/remote-service/alt-remote-services.xml
deleted file mode 100644
index 36409ce..0000000
--- a/felix/profiles/resources/OSGI-INF/remote-service/alt-remote-services.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
- <service-description>
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.TestService" />
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.CxfPublishHookTest$AdditionalInterface" />
-
- <property name="osgi.remote.interfaces" value="*" />
- <property name="osgi.remote.requires.intents" value="SOAP HTTP" />
- <property name="osgi.remote.configuration.type" value="pojo" />
- <property name="osgi.remote.configuration.pojo.address" value="http://localhost:9000/hello" />
- </service-description>
-</service-descriptions>
diff --git a/felix/profiles/resources/OSGI-INF/remote-service/multi-services.xml b/felix/profiles/resources/OSGI-INF/remote-service/multi-services.xml
deleted file mode 100644
index 3d20c08..0000000
--- a/felix/profiles/resources/OSGI-INF/remote-service/multi-services.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
- <service-description>
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.TestService" />
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.CxfPublishHookTest$AdditionalInterface" />
- <property name="osgi.remote.interfaces">org.apache.cxf.dosgi.dsw.hooks.TestService,org.apache.cxf.dosgi.dsw.hooks.CxfPublishHookTest$AdditionalInterface</property>
- <property name="osgi.remote.requires.intents">SOAP HTTP</property>
- <property name="osgi.remote.configuration.type">pojo</property>
- <property name="osgi.remote.configuration.pojo.address"
- interface="org.apache.cxf.dosgi.dsw.hooks.TestService">
- http://localhost:9001/hello
- </property>
- <property name="osgi.remote.configuration.pojo.address"
- interface="org.apache.cxf.dosgi.dsw.hooks.CxfPublishHookTest$AdditionalInterface">
- http://localhost:9002/hello
- </property>
- </service-description>
-</service-descriptions>
diff --git a/felix/profiles/resources/OSGI-INF/remote-service/remote-services.xml b/felix/profiles/resources/OSGI-INF/remote-service/remote-services.xml
deleted file mode 100644
index 45b2a20..0000000
--- a/felix/profiles/resources/OSGI-INF/remote-service/remote-services.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
- <service-description>
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.TestService" />
- <provide interface="org.apache.cxf.dosgi.dsw.hooks.CxfPublishHookTest$AdditionalInterface" />
-
- <property name="osgi.remote.interfaces">*</property>
- <property name="osgi.remote.requires.intents">SOAP HTTP</property>
- <property name="osgi.remote.configuration.type">pojo</property>
- <property name="osgi.remote.configuration.pojo.address">http://localhost:9000/hello</property>
- </service-description>
-</service-descriptions>
diff --git a/felix/profiles/resources/test-resources/rs1.xml b/felix/profiles/resources/test-resources/rs1.xml
deleted file mode 100644
index f67a833..0000000
--- a/felix/profiles/resources/test-resources/rs1.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
- <service-description>
- <provide interface="SomeService" />
- <property name="osgi.remote.requires.intents">confidentiality</property>
- </service-description>
- <service-description>
- <provide interface="SomeOtherService" />
- <provide interface="WithSomeSecondInterface" />
- </service-description>
-</service-descriptions>
diff --git a/felix/profiles/resources/test-resources/rs2.xml b/felix/profiles/resources/test-resources/rs2.xml
deleted file mode 100644
index 098aa21..0000000
--- a/felix/profiles/resources/test-resources/rs2.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
- <service-description>
- <provide interface="org.example.Service" />
- <property name="deployment.intents">confidentiality.message integrity</property>
- <property name="osgi.remote.interfaces">*</property>
- </service-description>
-</service-descriptions>
diff --git a/felix/profiles/resources/test-resources/sd-1.xml b/felix/profiles/resources/test-resources/sd-1.xml
deleted file mode 100644
index 483b196..0000000
--- a/felix/profiles/resources/test-resources/sd-1.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<test>
- <some-other-tag/>
-</test>
\ No newline at end of file
diff --git a/felix/profiles/resources/test-resources/sd.xml b/felix/profiles/resources/test-resources/sd.xml
deleted file mode 100644
index c7cebfb..0000000
--- a/felix/profiles/resources/test-resources/sd.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<service-decorations xmlns="http://cxf.apache.org/xmlns/service-decoration/1.0.0">
- <service-decoration>
- <match interface="org.acme.foo.*">
- <match-property name="test.prop" value="xyz"/>
- <add-property name="test.too" value="ahaha" type="java.lang.String"/>
- </match>
- </service-decoration>
-</service-decorations>
\ No newline at end of file
diff --git a/felix/profiles/resources/test-resources/sd0.xml b/felix/profiles/resources/test-resources/sd0.xml
deleted file mode 100644
index 0ad0ad1..0000000
--- a/felix/profiles/resources/test-resources/sd0.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<service-decorations xmlns="http://cxf.apache.org/xmlns/service-decoration/1.0.0">
-</service-decorations>
\ No newline at end of file
diff --git a/felix/profiles/resources/test-resources/sd1.xml b/felix/profiles/resources/test-resources/sd1.xml
deleted file mode 100644
index 6a5e811..0000000
--- a/felix/profiles/resources/test-resources/sd1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<service-decorations xmlns="http://cxf.apache.org/xmlns/service-decoration/1.0.0">
- <service-decoration>
- <match interface="org.test.A">
- <add-property name="A" value="B"/>
- <add-property name="C" value="2" type="java.lang.Integer"/>
- </match>
- </service-decoration>
-</service-decorations>
\ No newline at end of file
diff --git a/felix/profiles/resources/test-resources/sd2.xml b/felix/profiles/resources/test-resources/sd2.xml
deleted file mode 100644
index fb6a93a..0000000
--- a/felix/profiles/resources/test-resources/sd2.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<service-decorations xmlns="http://cxf.apache.org/xmlns/service-decoration/1.0.0">
- <service-decoration>
- <match interface="org.test.(B|C)">
- <match-property name="x" value="y"/>
- <add-property name="bool" value="true" type="java.lang.Boolean"/>
- </match>
- </service-decoration>
- <service-decoration>
- <match interface="org.test.(B|C)">
- <match-property name="x" value="z"/>
- <add-property name="bool" value="false" type="java.lang.Boolean"/>
- </match>
- </service-decoration>
-</service-decorations>
\ No newline at end of file
diff --git a/felix/profiles/src/main/java/felix/EmptyClass.java b/felix/profiles/src/main/java/felix/EmptyClass.java
deleted file mode 100644
index 58758f7..0000000
--- a/felix/profiles/src/main/java/felix/EmptyClass.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package felix;
-
-public class EmptyClass {
-}
\ No newline at end of file
diff --git a/felix/profiles/src/main/resources/client_bundles.txt b/felix/profiles/src/main/resources/client_bundles.txt
deleted file mode 100644
index 0bf6534..0000000
--- a/felix/profiles/src/main/resources/client_bundles.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-ws-metadata_2.0_spec/1.1.3/geronimo-ws-metadata_2.0_spec-1.1.3.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0/geronimo-servlet_3.0_spec-1.0.jar
-
-start file:${maven.repo.local}/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar
-
-start file:${maven.repo.local}/org/jdom/com.springsource.org.jdom/1.1.0/com.springsource.org.jdom-1.1.0.jar
-
-start file:${maven.repo.local}/org/jaxen/com.springsource.org.jaxen/1.1.1/com.springsource.org.jaxen-1.1.1.jar
-
-start file:${maven.repo.local}/org/springframework/spring-core/${spring.version}/spring-core-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-beans/${spring.version}/spring-beans-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-context/${spring.version}/spring-context-${spring.version}.jar
-
-start file:${maven.repo.local}/org/aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar
-
-start file:${maven.repo.local}/org/springframework/spring-aop/${spring.version}/spring-aop-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-expression/${spring.version}/spring-expression-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-asm/${spring.version}/spring-asm-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-io/${spring.osgi.version}/spring-osgi-io-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-core/${spring.osgi.version}/spring-osgi-core-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-extender/${spring.osgi.version}/spring-osgi-extender-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/eclipse/jetty/aggregate/jetty-all-server/${jetty.version}/jetty-all-server-${jetty.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.locator/${servicemix.specs.version}/org.apache.servicemix.specs.locator-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix.specs.version}/org.apache.servicemix.specs.saaj-api-1.3-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}/org.apache.servicemix.specs.stax-api-1.0-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxb-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxb-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxws-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxbimpl.bundle.version}/org.apache.servicemix.bundles.jaxb-impl-${jaxbimpl.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wsdl4j/${wsdl4j.bundle.version}/org.apache.servicemix.bundles.wsdl4j-${wsdl4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlsec/${xmlsec.bundle.version}/org.apache.servicemix.bundles.xmlsec-${xmlsec.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wss4j/${wss4j.bundle.version}/org.apache.servicemix.bundles.wss4j-${wss4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/sws/xmlschema/xmlschema-core/${xmlschema.bundle.version}/xmlschema-core-${xmlschema.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/${asm.bundle.version}/org.apache.servicemix.bundles.asm-${asm.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver.bundle.version}/org.apache.servicemix.bundles.xmlresolver-${xmlresolver.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/neethi/neethi/${neethi.bundle.version}/neethi-${neethi.bundle.version}.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/woodstox-core-asl/${woodstox.bundle.version}/woodstox-core-asl-${woodstox.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.joda-time/1.5.2_4/org.apache.servicemix.bundles.joda-time-1.5.2_4.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.opensaml/2.4.1_1/org.apache.servicemix.bundles.opensaml-2.4.1_1.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-bundle-minimal/${cxf.version}/cxf-bundle-minimal-${cxf.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-discovery-local/${project.version}/cxf-dosgi-ri-discovery-local-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-dsw-cxf/${project.version}/cxf-dosgi-ri-dsw-cxf-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-samples-greeter-interface/${project.version}/cxf-dosgi-ri-samples-greeter-interface-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-samples-greeter-client/${project.version}/cxf-dosgi-ri-samples-greeter-client-${project.version}.jar
-
diff --git a/felix/profiles/src/main/resources/dosgi_bundles.txt b/felix/profiles/src/main/resources/dosgi_bundles.txt
deleted file mode 100644
index 8506239..0000000
--- a/felix/profiles/src/main/resources/dosgi_bundles.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-ws-metadata_2.0_spec/1.1.3/geronimo-ws-metadata_2.0_spec-1.1.3.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0/geronimo-servlet_3.0_spec-1.0.jar
-
-start file:${maven.repo.local}/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar
-
-start file:${maven.repo.local}/org/jdom/com.springsource.org.jdom/1.1.0/com.springsource.org.jdom-1.1.0.jar
-
-start file:${maven.repo.local}/org/jaxen/com.springsource.org.jaxen/1.1.1/com.springsource.org.jaxen-1.1.1.jar
-
-start file:${maven.repo.local}/org/springframework/spring-core/${spring.version}/spring-core-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-beans/${spring.version}/spring-beans-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-context/${spring.version}/spring-context-${spring.version}.jar
-
-start file:${maven.repo.local}/org/aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar
-
-start file:${maven.repo.local}/org/springframework/spring-aop/${spring.version}/spring-aop-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-expression/${spring.version}/spring-expression-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-asm/${spring.version}/spring-asm-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-io/${spring.osgi.version}/spring-osgi-io-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-core/${spring.osgi.version}/spring-osgi-core-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-extender/${spring.osgi.version}/spring-osgi-extender-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/eclipse/jetty/aggregate/jetty-all-server/${jetty.version}/jetty-all-server-${jetty.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.locator/${servicemix.specs.version}/org.apache.servicemix.specs.locator-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix.specs.version}/org.apache.servicemix.specs.saaj-api-1.3-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}/org.apache.servicemix.specs.stax-api-1.0-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxb-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxb-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxws-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxbimpl.bundle.version}/org.apache.servicemix.bundles.jaxb-impl-${jaxbimpl.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wsdl4j/${wsdl4j.bundle.version}/org.apache.servicemix.bundles.wsdl4j-${wsdl4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlsec/${xmlsec.bundle.version}/org.apache.servicemix.bundles.xmlsec-${xmlsec.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wss4j/${wss4j.bundle.version}/org.apache.servicemix.bundles.wss4j-${wss4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/sws/xmlschema/xmlschema-core/${xmlschema.bundle.version}/xmlschema-core-${xmlschema.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/${asm.bundle.version}/org.apache.servicemix.bundles.asm-${asm.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver.bundle.version}/org.apache.servicemix.bundles.xmlresolver-${xmlresolver.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/neethi/neethi/${neethi.bundle.version}/neethi-${neethi.bundle.version}.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/woodstox-core-asl/${woodstox.bundle.version}/woodstox-core-asl-${woodstox.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.joda-time/1.5.2_4/org.apache.servicemix.bundles.joda-time-1.5.2_4.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.opensaml/2.4.1_1/org.apache.servicemix.bundles.opensaml-2.4.1_1.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-bundle-minimal/${cxf.version}/cxf-bundle-minimal-${cxf.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-discovery-local/${project.version}/cxf-dosgi-ri-discovery-local-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-dsw-cxf/${project.version}/cxf-dosgi-ri-dsw-cxf-${project.version}.jar
-
diff --git a/felix/profiles/src/main/resources/server_bundles.txt b/felix/profiles/src/main/resources/server_bundles.txt
deleted file mode 100644
index b15a054..0000000
--- a/felix/profiles/src/main/resources/server_bundles.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-ws-metadata_2.0_spec/1.1.3/geronimo-ws-metadata_2.0_spec-1.1.3.jar
-
-start file:${maven.repo.local}/org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0/geronimo-servlet_3.0_spec-1.0.jar
-
-start file:${maven.repo.local}/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar
-
-start file:${maven.repo.local}/org/jdom/com.springsource.org.jdom/1.1.0/com.springsource.org.jdom-1.1.0.jar
-
-start file:${maven.repo.local}/org/jaxen/com.springsource.org.jaxen/1.1.1/com.springsource.org.jaxen-1.1.1.jar
-
-start file:${maven.repo.local}/org/springframework/spring-core/${spring.version}/spring-core-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-beans/${spring.version}/spring-beans-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-context/${spring.version}/spring-context-${spring.version}.jar
-
-start file:${maven.repo.local}/org/aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar
-
-start file:${maven.repo.local}/org/springframework/spring-aop/${spring.version}/spring-aop-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-expression/${spring.version}/spring-expression-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/spring-asm/${spring.version}/spring-asm-${spring.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-io/${spring.osgi.version}/spring-osgi-io-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-core/${spring.osgi.version}/spring-osgi-core-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/springframework/osgi/spring-osgi-extender/${spring.osgi.version}/spring-osgi-extender-${spring.osgi.version}.jar
-
-start file:${maven.repo.local}/org/eclipse/jetty/aggregate/jetty-all-server/${jetty.version}/jetty-all-server-${jetty.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.locator/${servicemix.specs.version}/org.apache.servicemix.specs.locator-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.3/${servicemix.specs.version}/org.apache.servicemix.specs.saaj-api-1.3-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}/org.apache.servicemix.specs.stax-api-1.0-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxb-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxb-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.1/${servicemix.specs.version}/org.apache.servicemix.specs.jaxws-api-2.1-${servicemix.specs.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxbimpl.bundle.version}/org.apache.servicemix.bundles.jaxb-impl-${jaxbimpl.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wsdl4j/${wsdl4j.bundle.version}/org.apache.servicemix.bundles.wsdl4j-${wsdl4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlsec/${xmlsec.bundle.version}/org.apache.servicemix.bundles.xmlsec-${xmlsec.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wss4j/${wss4j.bundle.version}/org.apache.servicemix.bundles.wss4j-${wss4j.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/sws/xmlschema/xmlschema-core/${xmlschema.bundle.version}/xmlschema-core-${xmlschema.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/${asm.bundle.version}/org.apache.servicemix.bundles.asm-${asm.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver.bundle.version}/org.apache.servicemix.bundles.xmlresolver-${xmlresolver.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/neethi/neethi/${neethi.bundle.version}/neethi-${neethi.bundle.version}.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
-
-start file:${maven.repo.local}/org/codehaus/woodstox/woodstox-core-asl/${woodstox.bundle.version}/woodstox-core-asl-${woodstox.bundle.version}.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.joda-time/1.5.2_4/org.apache.servicemix.bundles.joda-time-1.5.2_4.jar
-
-start file:${maven.repo.local}/org/apache/servicemix/bundles/org.apache.servicemix.bundles.opensaml/2.4.1_1/org.apache.servicemix.bundles.opensaml-2.4.1_1.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-bundle-minimal/${cxf.version}/cxf-bundle-minimal-${cxf.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-discovery-local/${project.version}/cxf-dosgi-ri-discovery-local-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-dsw-cxf/${project.version}/cxf-dosgi-ri-dsw-cxf-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-samples-greeter-interface/${project.version}/cxf-dosgi-ri-samples-greeter-interface-${project.version}.jar
-
-start file:${maven.repo.local}/org/apache/cxf/cxf-dosgi-ri-samples-greeter-impl/${project.version}/cxf-dosgi-ri-samples-greeter-impl-${project.version}.jar
-
diff --git a/felix/remote-debug.txt b/felix/remote-debug.txt
deleted file mode 100644
index 229262b..0000000
--- a/felix/remote-debug.txt
+++ /dev/null
@@ -1 +0,0 @@
--Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
diff --git a/felix/shell.tui/LICENSE b/felix/shell.tui/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/felix/shell.tui/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/felix/shell.tui/NOTICE b/felix/shell.tui/NOTICE
deleted file mode 100644
index d96621a..0000000
--- a/felix/shell.tui/NOTICE
+++ /dev/null
@@ -1,20 +0,0 @@
-Apache Felix Shell Textual Interface
-Copyright 2006-2008 The Apache Software Foundation
-
-I. Included Software
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-Licensed under the Apache License 2.0.
-
-
-II. Used Software
-
-This product uses software developed at
-The OSGi Alliance (http://www.osgi.org/).
-Copyright 2006 The OSGi Alliance.
-Licensed under the Apache License 2.0.
-
-
-III. License Summary
-- Apache License 2.0
diff --git a/felix/shell.tui/pom.xml b/felix/shell.tui/pom.xml
deleted file mode 100644
index e0a6d6f..0000000
--- a/felix/shell.tui/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<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>
- <packaging>bundle</packaging>
- <name>Distributed OSGi Temporary Private Apache Felix Shell TUI Build</name>
- <description>A simple textual user interface for Felix' shell service.</description>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>felix-shell-extension</artifactId>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <maven.test.skip>true</maven.test.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.4.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.shell</artifactId>
- <version>1.4.3</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <excludes>**/*.java</excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>1.4.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Private-Package>org.apache.felix.shell.tui.*</Private-Package>
- <Bundle-Activator>org.apache.felix.shell.tui.Activator</Bundle-Activator>
- <Bundle-DocURL>http://oscar-osgi.sf.net/obr2/${project.artifactId}/</Bundle-DocURL>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
- <Import-Service>org.apache.felix.shell.ShellService</Import-Service>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/felix/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java b/felix/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
deleted file mode 100644
index c41ca32..0000000
--- a/felix/shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.shell.tui;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.apache.felix.shell.ShellService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-
-public class Activator implements BundleActivator {
-
- private static final String RUN_CMD = "run ";
-
- private BundleContext context;
- private ShellTuiRunnable shellRunnable;
- private Thread thread;
- private ServiceListener listener;
- private ServiceReference shellRef;
- private ShellService shell;
-
- public void start(BundleContext bcontext) {
- context = bcontext;
-
- // Listen for registering/unregistering impl service.
- listener = new ShellServiceListener();
- try {
- context.addServiceListener(listener,
- "(objectClass=" + org.apache.felix.shell.ShellService.class.getName() + ")");
- } catch (InvalidSyntaxException ex) {
- System.err.println("ShellTui: Cannot add service listener.");
- System.err.println("ShellTui: " + ex);
- }
-
- // Now try to manually initialize the impl service
- // since one might already be available.
- initializeService();
-
- // Start impl thread.
- shellRunnable = new ShellTuiRunnable();
- thread = new Thread(shellRunnable, "Felix Shell TUI");
- thread.start();
- }
-
- public void stop(BundleContext bcontext) {
- if (shellRunnable != null) {
- shellRunnable.stop();
- thread.interrupt();
- }
- if (listener != null) {
- context.removeServiceListener(listener);
- }
- uninitializeService();
- }
-
- private synchronized void initializeService() {
- if (shell != null) {
- return;
- }
- shellRef = context.getServiceReference(org.apache.felix.shell.ShellService.class.getName());
- if (shellRef == null) {
- return;
- }
- shell = (ShellService)context.getService(shellRef);
- }
-
- private synchronized void uninitializeService() {
- if (shellRef != null) {
- context.ungetService(shellRef);
- }
- shellRef = null;
- shell = null;
- }
-
- private class ShellServiceListener implements ServiceListener {
- public void serviceChanged(ServiceEvent event) {
- synchronized (Activator.this) {
- if (event.getType() == ServiceEvent.REGISTERED) {
- // Ignore additional services if we already have one.
- if (shellRef == null) {
- // Initialize the service if we don't have one.
- initializeService();
- }
- } else if (event.getType() == ServiceEvent.UNREGISTERING
- && event.getServiceReference().equals(shellRef)) {
- // Unget the service if it is unregistering.
- uninitializeService();
- // Try to get another service.
- initializeService();
- }
- }
- }
- }
-
- private class ShellTuiRunnable implements Runnable {
-
- private volatile boolean stop;
-
- public void stop() {
- stop = true;
- }
-
- public void run() {
- String line;
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
-
- while (!stop) {
- System.out.print("-> ");
-
- try {
- line = in.readLine();
- } catch (IOException ex) {
- System.err.println("Could not read input, please try again.");
- continue;
- }
-
- synchronized (Activator.this) {
- if (shell == null) {
- System.out.println("No impl service available.");
- continue;
- }
-
- if (line == null) {
- continue;
- }
-
- line = line.trim();
-
- if (line.isEmpty()) {
- continue;
- }
-
- try {
- if (line.startsWith(RUN_CMD)) {
- String path = line.substring(RUN_CMD.length()).trim();
- System.out.println("loading commands from: " + path);
- File commands = new File(path);
- if (commands.exists()) {
- BufferedReader reader = new BufferedReader(new FileReader(commands));
- String command = reader.readLine().trim();
- while (command != null) {
- if (!command.isEmpty()) {
- System.out.println("\nexecuting: " + command);
- shell.executeCommand(command.trim(), System.out, System.err);
- }
- command = reader.readLine();
- }
- reader.close();
- } else {
- System.err.println(path + " not found");
- }
- } else {
- shell.executeCommand(line, System.out, System.err);
- }
- } catch (Exception ex) {
- System.err.println("ShellTui: " + ex);
- ex.printStackTrace();
- }
- }
- }
- }
- }
-}
diff --git a/parent/pom.xml b/parent/pom.xml
index e30dc89..82bb30a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -32,14 +32,9 @@
<osgi.compendium.version>4.3.1</osgi.compendium.version>
<aries.rsa.version>1.8.0</aries.rsa.version>
<cxf.version>3.1.6</cxf.version>
- <cxf.build-utils.version>3.1.0</cxf.build-utils.version>
<felix.version>5.4.0</felix.version>
- <spring.version>4.2.4.RELEASE</spring.version>
- <spring.osgi.version>1.2.1</spring.osgi.version>
<zookeeper.version>3.4.8</zookeeper.version>
-
<remote.service.admin.interfaces.version>1.0.0</remote.service.admin.interfaces.version>
-
<servicemix.specs.version>2.6.0</servicemix.specs.version>
<pax.web.version>1.0.11</pax.web.version>
<pax.logging.version>1.7.0</pax.logging.version>
@@ -57,6 +52,7 @@
<jaxbimpl.bundle.version>2.2.1.1_2</jaxbimpl.bundle.version>
<slf4j.version>1.7.14</slf4j.version>
<exam.version>4.8.0</exam.version>
+ <baseline.skip>true</baseline.skip>
</properties>
<dependencyManagement>
@@ -157,6 +153,46 @@
</dependency>
</dependencies>
</dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.aries.rsa</groupId>
+ <artifactId>org.apache.aries.rsa.spi</artifactId>
+ <version>${aries.rsa.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>1.7.14</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
<build>
<defaultGoal>install</defaultGoal>
@@ -236,8 +272,24 @@
<extensions>true</extensions>
<configuration>
<obrRepository>NONE</obrRepository>
- <_include>-bnd.bnd</_include>
+ <instructions>
+ <Export-Package>!*</Export-Package>
+ <_include>-bnd.bnd</_include>
+ </instructions>
</configuration>
+ <executions>
+ <execution>
+ <id>baseline</id>
+ <goals>
+ <goal>baseline</goal>
+ </goals>
+ <configuration>
+ <comparisonVersion>${baseline}</comparisonVersion>
+ <skip>${baseline.skip}</skip>
+ <failOnError>true</failOnError>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/samples/ds/interface/bnd.bnd b/samples/ds/interface/bnd.bnd
new file mode 100644
index 0000000..0bf50d5
--- /dev/null
+++ b/samples/ds/interface/bnd.bnd
@@ -0,0 +1 @@
+Export-Package: org.apache.cxf.dosgi.samples.ds
\ No newline at end of file
diff --git a/samples/ds/interface/pom.xml b/samples/ds/interface/pom.xml
index 4598db8..1952f06 100644
--- a/samples/ds/interface/pom.xml
+++ b/samples/ds/interface/pom.xml
@@ -20,11 +20,9 @@
<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>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
<artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
<packaging>bundle</packaging>
<name>Distributed OSGI Declarative Services Sample Interface</name>
- <version>1.9-SNAPSHOT</version>
<parent>
<groupId>org.apache.cxf.dosgi.samples</groupId>
@@ -36,22 +34,4 @@
<topDirectoryLocation>..</topDirectoryLocation>
</properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The interfaces of the Distributed OSGi with Declarative Services sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package />
- <Export-Package>org.apache.cxf.dosgi.samples.ds</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/samples/greeter/interface/bnd.bnd b/samples/greeter/interface/bnd.bnd
new file mode 100644
index 0000000..241de97
--- /dev/null
+++ b/samples/greeter/interface/bnd.bnd
@@ -0,0 +1 @@
+Export-Package: org.apache.cxf.dosgi.samples.greeter
\ No newline at end of file
diff --git a/samples/greeter_rest/interface/bnd.bnd b/samples/greeter_rest/interface/bnd.bnd
new file mode 100644
index 0000000..dad324a
--- /dev/null
+++ b/samples/greeter_rest/interface/bnd.bnd
@@ -0,0 +1 @@
+Export-Package: org.apache.cxf.dosgi.samples.greeter.rest
\ No newline at end of file
diff --git a/samples/greeter_rest/interface/pom.xml b/samples/greeter_rest/interface/pom.xml
index c312f43..91b33da 100644
--- a/samples/greeter_rest/interface/pom.xml
+++ b/samples/greeter_rest/interface/pom.xml
@@ -23,7 +23,6 @@
<artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId>
<packaging>bundle</packaging>
<name>Distributed OSGI Greeter REST Interface</name>
- <version>1.9-SNAPSHOT</version>
<parent>
<groupId>org.apache.cxf.dosgi</groupId>
@@ -33,23 +32,11 @@
</parent>
<properties>
- <bundle.import.package>javax.ws.rs,javax.xml.bind.annotation,*</bundle.import.package>
- <bundle.export.package>org.apache.cxf.dosgi.samples.greeter.rest</bundle.export.package>
- <topDirectoryLocation>..</topDirectoryLocation>
+ <topDirectoryLocation>../../..</topDirectoryLocation>
</properties>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.servicemix.specs</groupId>
<artifactId>org.apache.servicemix.specs.jsr339-api-m10</artifactId>
<version>${servicemix.specs.version}</version>
@@ -61,22 +48,4 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>CXF Distributed OSGi Greeter REST Demo Interface Bundle</Bundle-Name>
- <Bundle-Description>The interfaces of the CXF Distributed OSGi Greeter REST demo</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package>${bundle.import.package}</Import-Package>
- <Export-Package>${bundle.export.package}</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
diff --git a/samples/security_filter/bnd.bnd b/samples/security_filter/bnd.bnd
new file mode 100644
index 0000000..2056f10
--- /dev/null
+++ b/samples/security_filter/bnd.bnd
@@ -0,0 +1,2 @@
+Private-Package: org.apache.cxf.dosgi.samples.security
+Bundle-Activator: org.apache.cxf.dosgi.samples.security.Activator
\ No newline at end of file
diff --git a/samples/security_filter/pom.xml b/samples/security_filter/pom.xml
index 3598cfc..1c6d0c6 100644
--- a/samples/security_filter/pom.xml
+++ b/samples/security_filter/pom.xml
@@ -16,7 +16,6 @@
<artifactId>cxf-dosgi-ri-samples-security</artifactId>
<packaging>bundle</packaging>
<name>Distributed OSGI Security Sample Bundle</name>
- <version>1.9-SNAPSHOT</version>
<parent>
<groupId>org.apache.cxf.dosgi</groupId>
@@ -31,14 +30,6 @@
<dependencies>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_${servlet.version}_spec</artifactId>
<version>1.0</version>
@@ -48,30 +39,6 @@
<artifactId>org.apache.servicemix.specs.jsr311-api-1.0</artifactId>
<version>${servicemix.specs.version}</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>An example Distributed OSGi
- endpoint that passes requests through a
- security filter</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Private-Package>org.apache.cxf.dosgi.samples.security</Private-Package>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.security.Activator</Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>