diff --git a/.gitignore b/.gitignore
index 69b3cb48..9bfd5700 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ parser_commons/target/
distribution/target/
broker/moquette.log
broker/runner
+/bundle/target/
\ No newline at end of file
diff --git a/broker/pom.xml b/broker/pom.xml
index 836769ca..66873dc8 100644
--- a/broker/pom.xml
+++ b/broker/pom.xml
@@ -11,7 +11,7 @@
moquette-broker
- bundle
+ jar
Moquette - broker
@@ -43,14 +43,14 @@
org.slf4j
slf4j-api
1.7.5
- provided
+
org.slf4j
slf4j-log4j12
1.7.5
- provided
+
@@ -76,35 +76,35 @@
io.netty
netty-common
4.0.8.Final
- provided
+
io.netty
netty-buffer
4.0.8.Final
- provided
+
io.netty
netty-transport
4.0.8.Final
- provided
+
io.netty
netty-handler
4.0.8.Final
- provided
+
io.netty
netty-codec
4.0.8.Final
- provided
+
@@ -118,7 +118,7 @@
org.fusesource.hawtdb
hawtdb
1.6
- provided
+
@@ -172,7 +172,7 @@
-
+
+ Pax Runner Maven plugin
org.ops4j
maven-pax-plugin
1.4
-
+ Pax Runner version
1.4.0
-
+ OSGi framework type (equinox, felix, knopflerfish)
equinox
-
+ - -log=debug
+ - -workingDirectory=target/runner
-
+ -->
diff --git a/bundle/howto.txt b/bundle/howto.txt
new file mode 100644
index 00000000..5ca53ebd
--- /dev/null
+++ b/bundle/howto.txt
@@ -0,0 +1,8 @@
+Simple guide on how to use the bundle in a testable OSGi container:
+- mvn pax:provision //to create and download the required bundles
+- osgi>exit
+- cp target/moquette-bundle-0.5-SNAPSHOT.jar runner/bundles/ //to move the broker bundle
+- mvn pax:provision //restart the OSGi container
+- osgi> install file:bundles/moquette-bundle-0.5-SNAPSHOT.jar
+- osgi> ss
+- osgi> start
diff --git a/bundle/pom.xml b/bundle/pom.xml
new file mode 100644
index 00000000..111773e0
--- /dev/null
+++ b/bundle/pom.xml
@@ -0,0 +1,230 @@
+
+
+ 4.0.0
+
+ ../
+
+ moquette-parent
+ org.dna.mqtt
+ 0.5-SNAPSHOT
+
+
+ moquette-bundle
+ bundle
+
+ Moquette - OSGi bundle
+
+
+ UTF-8
+
+
+
+
+ org.dna.mqtt
+ moquette-parser-commons
+ ${project.version}
+
+
+
+ org.dna.mqtt
+ moquette-netty-parser
+ ${project.version}
+
+
+
+ org.dna.mqtt
+ moquette-broker
+ ${project.version}
+
+
+
+ com.googlecode.disruptor
+ disruptor
+ 2.7.1
+
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.5
+ provided
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ 1.7.5
+ provided
+
+
+
+ org.apache.felix
+ org.osgi.core
+ 1.0.0
+
+
+
+ org.apache.felix
+ org.osgi.compendium
+ 1.0.0
+
+
+
+
+ commons-logging
+ commons-logging
+ 1.1.3
+
+
+
+ io.netty
+ netty-common
+ 4.0.8.Final
+ provided
+
+
+
+ io.netty
+ netty-buffer
+ 4.0.8.Final
+ provided
+
+
+
+ io.netty
+ netty-transport
+ 4.0.8.Final
+ provided
+
+
+
+ io.netty
+ netty-handler
+ 4.0.8.Final
+ provided
+
+
+
+ io.netty
+ netty-codec
+ 4.0.8.Final
+ provided
+
+
+
+ org.fusesource.hawtbuf
+ hawtbuf
+ 1.9
+ provided
+
+
+
+ org.fusesource.hawtdb
+ hawtdb
+ 1.6
+ provided
+
+
+
+ junit
+ junit
+ 4.8.2
+ test
+
+
+
+
+ org.mockito
+ mockito-core
+ 1.9.0
+ test
+
+
+
+ org.fusesource.mqtt-client
+ mqtt-client
+ 1.5
+ test
+
+
+
+ org.eclipse.paho
+ mqtt-client
+ 0.4.0
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ **/*Test.java
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.1.0
+ true
+
+
+ org.dna.mqtt.commons,
+ org.apache.commons.logging,
+ org.dna.mqtt.moquette.messaging.spi.impl.storage,
+ org.dna.mqtt.moquette.messaging.spi.impl.subscriptions,
+ org.dna.mqtt.moquette.proto.messages,
+ org.dna.mqtt.moquette.server.netty.metrics
+
+ org.dna.mqtt.moquette.bundle,
+ ${project.groupId}.*,
+ com.lmax.*
+
+ *
+ ${project.groupId}.moquette.bundle.Activator
+
+
+
+
+
+ org.ops4j
+ maven-pax-plugin
+ 1.4
+
+
+ 1.4.0
+
+ equinox
+
+
+
+
+
+
+
+
+
+
+ Paho Releases
+ https://repo.eclipse.org/content/repositories/paho-releases/
+
+
+
+
diff --git a/broker/src/main/java/org/dna/mqtt/moquette/bundle/Activator.java b/bundle/src/main/java/org/dna/mqtt/moquette/bundle/Activator.java
similarity index 100%
rename from broker/src/main/java/org/dna/mqtt/moquette/bundle/Activator.java
rename to bundle/src/main/java/org/dna/mqtt/moquette/bundle/Activator.java
diff --git a/pom.xml b/pom.xml
index 44c5b19b..cd1a1d1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,7 @@
netty_parser
broker
distribution
+ bundle