Author: cschneider
Date: Tue Nov 4 13:36:39 2014
New Revision: 1636579
URL: http://svn.apache.org/r1636579
Log:
ARIES-1198 Switch from blueprint to activator
Added:
aries/trunk/web/web-urlhandler/src/main/java/org/apache/aries/web/converter/impl/Activator.java
Removed:
aries/trunk/web/web-urlhandler/src/main/resources/OSGI-INF/blueprint/WARHandler.xml
Modified:
aries/trunk/web/web-itests/pom.xml
aries/trunk/web/web-itests/src/test/java/org/apache/aries/web/converter/itest/WabConverterITest.java
aries/trunk/web/web-urlhandler/pom.xml
Modified: aries/trunk/web/web-itests/pom.xml
URL:
http://svn.apache.org/viewvc/aries/trunk/web/web-itests/pom.xml?rev=1636579&r1=1636578&r2=1636579&view=diff
==============================================================================
--- aries/trunk/web/web-itests/pom.xml (original)
+++ aries/trunk/web/web-itests/pom.xml Tue Nov 4 13:36:39 2014
@@ -94,7 +94,7 @@
<groupId>org.apache.aries.proxy</groupId>
<artifactId>org.apache.aries.proxy</artifactId>
<scope>test</scope>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
@@ -117,7 +117,7 @@
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-forked</artifactId>
+ <artifactId>pax-exam-container-native</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
Modified:
aries/trunk/web/web-itests/src/test/java/org/apache/aries/web/converter/itest/WabConverterITest.java
URL:
http://svn.apache.org/viewvc/aries/trunk/web/web-itests/src/test/java/org/apache/aries/web/converter/itest/WabConverterITest.java?rev=1636579&r1=1636578&r2=1636579&view=diff
==============================================================================
---
aries/trunk/web/web-itests/src/test/java/org/apache/aries/web/converter/itest/WabConverterITest.java
(original)
+++
aries/trunk/web/web-itests/src/test/java/org/apache/aries/web/converter/itest/WabConverterITest.java
Tue Nov 4 13:36:39 2014
@@ -128,7 +128,6 @@ public class WabConverterITest extends A
mavenBundle("org.apache.aries",
"org.apache.aries.util"),
mavenBundle("org.ow2.asm", "asm-debug-all"),
mavenBundle("org.apache.aries.proxy",
"org.apache.aries.proxy"),
- mavenBundle("org.apache.aries.blueprint",
"org.apache.aries.blueprint"),
mavenBundle("org.apache.aries.testsupport",
"org.apache.aries.testsupport.unit"));
}
Modified: aries/trunk/web/web-urlhandler/pom.xml
URL:
http://svn.apache.org/viewvc/aries/trunk/web/web-urlhandler/pom.xml?rev=1636579&r1=1636578&r2=1636579&view=diff
==============================================================================
--- aries/trunk/web/web-urlhandler/pom.xml (original)
+++ aries/trunk/web/web-urlhandler/pom.xml Tue Nov 4 13:36:39 2014
@@ -49,6 +49,7 @@
org.apache.aries.web.converter.impl,
org.apache.aries.web.url
</aries.osgi.private.pkg>
+
<aries.osgi.activator>org.apache.aries.web.converter.impl.Activator</aries.osgi.activator>
<lastReleaseVersion>1.0.0</lastReleaseVersion>
</properties>
@@ -68,12 +69,6 @@
<artifactId>asm-debug-all</artifactId>
<version>5.0.3</version>
</dependency>
- <dependency>
- <groupId>org.apache.aries.testsupport</groupId>
- <artifactId>org.apache.aries.testsupport.unit</artifactId>
- <scope>test</scope>
- <version>1.0.0</version>
- </dependency>
</dependencies>
<build>
Added:
aries/trunk/web/web-urlhandler/src/main/java/org/apache/aries/web/converter/impl/Activator.java
URL:
http://svn.apache.org/viewvc/aries/trunk/web/web-urlhandler/src/main/java/org/apache/aries/web/converter/impl/Activator.java?rev=1636579&view=auto
==============================================================================
---
aries/trunk/web/web-urlhandler/src/main/java/org/apache/aries/web/converter/impl/Activator.java
(added)
+++
aries/trunk/web/web-urlhandler/src/main/java/org/apache/aries/web/converter/impl/Activator.java
Tue Nov 4 13:36:39 2014
@@ -0,0 +1,45 @@
+/*
+ * 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 WARRANTIESOR 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.aries.web.converter.impl;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.aries.web.converter.WarToWabConverter;
+import org.apache.aries.web.url.WAR_URLServiceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.url.URLStreamHandlerService;
+
+public class Activator implements BundleActivator {
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ Dictionary<String, Object> props = new Hashtable<String, Object>();
+ props.put("url.handler.protocol", new String[]{"webbundle"});
+ context.registerService(URLStreamHandlerService.class, new
WAR_URLServiceHandler(), props);
+ context.registerService(WarToWabConverter.class, new
WarToWabConverterService(), null);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // Services will be unregistered by framework
+ }
+
+}