Added bundleactivator to XMLRouter.
authorErik Brakkee <erik@brakkee.org>
Thu, 18 Aug 2011 14:38:22 +0000 (16:38 +0200)
committerErik Brakkee <erik@brakkee.org>
Thu, 18 Aug 2011 14:38:22 +0000 (16:38 +0200)
pom.xml
router/bundle/pom.xml
router/bundle/src/main/java/org/wamblee/xmlrouter/bundle/XmlrouterActivator.java

diff --git a/pom.xml b/pom.xml
index 80ce38054f45dd2ca3f4893f4ac0d9e4bc304a66..d2d2a858a7558040a3193bd52286e595feeb347f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.core</artifactId>
                 <version>4.2.0</version>
+                <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.compendium</artifactId>
                 <version>4.2.0</version>
+                <scope>provided</scope>
             </dependency>
             
             <!-- Pax exam -->
index ff189df3a922a766c355e036605e5405fd720f5d..ae2e913a99a518520e8efdad6dca0402f4916823 100644 (file)
             <groupId>org.wamblee</groupId>
             <artifactId>wamblee-support-general</artifactId>
         </dependency>
-       
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
@@ -35,7 +45,7 @@
             <artifactId>mockito-all</artifactId>
         </dependency>
     </dependencies>
-    
+
     <build>
         <plugins>
             <plugin>
@@ -44,6 +54,7 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
+                        <Bundle-Activator>org.wamblee.xmlrouter.bundle.XmlrouterActivator</Bundle-Activator>
                         <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
                         <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                         <Embed-Directory>lib</Embed-Directory>
index 03bb4a6f3894f9ad3e48de2f52e2d755c7301e98..a070598f57d14d821916abf4bb22b865d68b585e 100644 (file)
  */
 package org.wamblee.xmlrouter.bundle;
 
-public class XmlrouterActivator {
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class XmlrouterActivator implements BundleActivator {
+
+    @Override
+    public void start(BundleContext aContext) throws Exception {
+        System.out.println("Starting bundle");
+    }
+
+    @Override
+    public void stop(BundleContext aContext) throws Exception {
+        System.out.println("Stopping bundle");
+    }
 
 }