Removed OSGi support

This commit is contained in:
andrea
2015-04-06 23:37:29 +02:00
parent d850262e6c
commit fc046003d5
6 changed files with 6 additions and 297 deletions
+1
View File
@@ -8,6 +8,7 @@ Version 0.7:
Added packetIdentifier storage and generation
Fixed issue #16, bad packetId for will messages with qos > 0
Added store path variable "persistent_store" to configuration file (picked from Steven Warwick fork)
Removed OSGi bundle, developer time burner
Version 0.6:
Fix issue #42, bad password file path composition
+5 -3
View File
@@ -2,19 +2,21 @@
#log4j.rootLogger=ERROR, A1
log4j.rootLogger=ERROR, stdout, file
#log4j.logger.org.eclipse.moquette=WARN
log4j.logger.org.eclipse.moquette=DEBUG
#log4j.logger.org.eclipse.moquette.server.ServerIntegrationFuseTest=DEBUG
#log4j.logger.org.eclipse.moquette.server.ServerLowlevelMessagesIntegrationTests=DEBUG
log4j.logger.org.eclipse.moquette.server.ServerIntegrationQoSValidationTest=INFO
#log4j.logger.org.eclipse.moquette.spi.impl.ProtocolProcessor=INFO
#log4j.logger.org.eclipse.moquette.spi.impl.ProtocolProcessor=WARN
log4j.logger.org.eclipse.moquette.spi.impl.ProtocolProcessor=DEBUG
#log4j.logger.org.eclipse.moquette.spi.impl.ProtocolProcessor=TRACE
log4j.logger.org.eclipse.moquette.spi.impl.SimpleMessaging=WARN
#Protocol parsing
log4j.logger.org.eclipse.moquette.server.netty.NettyMQTTHandler=WARN
#log4j.logger.org.eclipse.moquette.server.netty.NettyMQTTHandler=DEBUG
log4j.logger.org.eclipse.moquette.parser.netty=WARN
log4j.logger.org.eclipse.moquette.parser.netty=DEBUG
#Storage service
#log4j.logger.org.eclipse.moquette.spi.impl.subscriptions.SubscriptionsStore=DEBUG
log4j.logger.org.eclipse.moquette.spi.persistence.MapDBPersistentStore=WARN
-8
View File
@@ -1,8 +0,0 @@
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.jar runner/bundles/ //to move the broker bundle
- mvn pax:provision //restart the OSGi container
- osgi> install file:bundles/moquette-bundle-0.5.jar
- osgi> ss
- osgi> start <num last bundle>
-240
View File
@@ -1,240 +0,0 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<relativePath>../</relativePath>
<!--<relativePath>../pom.xml</relativePath>-->
<artifactId>moquette-parent</artifactId>
<groupId>org.eclipse.moquette</groupId>
<version>0.7-SNAPSHOT</version>
</parent>
<artifactId>moquette-bundle</artifactId>
<packaging>bundle</packaging>
<!--<version>${moquette-version}</version>-->
<name>Moquette - OSGi bundle</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>moquette-parser-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>moquette-netty-parser</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>moquette-broker</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
<!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Included to embedded an HawtDB dependency, we host commons-logging -->
<!--dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency-->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>${netty.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>2.0.0-SNAPSHOT</version>
<!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<!-- needs extra dependencies: objenesis & hamcrest -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.fusesource.mqtt-client</groupId>
<artifactId>mqtt-client</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
<!--org.eclipse.moquette.commons,-->
<!--org.apache.commons.logging,-->
<!--org.eclipse.moquette.spi.impl.storage,-->
<!--org.eclipse.moquette.spi.impl.subscriptions,-->
org.eclipse.moquette.proto.messages.*,
org.eclipse.moquette.server.netty.metrics
</Export-Package>
<Private-Package>
org.eclipse.moquette.bundle,
${project.groupId}.*
</Private-Package>
<!--<Private-Package>org.eclipse.moquette.bundle,-->
<!--${project.groupId}.*,-->
<!--com.lmax.*-->
<!--</Private-Package>-->
<!--<Import-Package>!org.eclipse.moquette,-->
<!--sun.misc.*;resolution:=optional,-->
<!--sun.nio.ch.*;resolution:=optional,-->
<!--*-->
<!--</Import-Package>-->
<!--<Embed-Dependency>mapdb;scope=compile|runtime;inline=true,-->
<!--disruptor;scope=compile|runtime;inline=true</Embed-Dependency>-->
<Bundle-Activator>${project.groupId}.bundle.Activator</Bundle-Activator>
</instructions>
<obrRepository>file://${basedir}/target/localobr/
</obrRepository>
</configuration>
</plugin>
<plugin>
<!-- Pax Runner Maven plugin -->
<groupId>org.ops4j</groupId>
<artifactId>maven-pax-plugin</artifactId>
<version>1.5</version>
<configuration>
<!-- Pax Runner version -->
<!--runner>1.8.5</runner-->
<runner>1.8.6</runner>
<!-- OSGi framework type (equinox, felix, knopflerfish) -->
<!--<framework>equinox</framework>-->
<framework>felix</framework>
<provision>
<!--param>- -vmOptions="-Dorg.osgi.framework.system.packages.extra=sun.misc"</param-->
<param>--bootDelegation=sun.*,com.sun.*</param>
<!--param>- -log=debug</param -->
<!--param> - -workingDirectory=target/runner</param> -->
<param>--autoWrap</param>
<param>mvn:org.hdrhistogram/HdrHistogram/2.1.4</param>
<!--<param>mvn:com.github.livesense/org.liveSense.fragment.sun.misc/1.0.5</param>-->
</provision>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>Paho Releases</id>
<url>https://repo.eclipse.org/content/repositories/paho-releases/</url>
</repository>
</repositories>
</project>
@@ -1,45 +0,0 @@
/*
* Copyright (c) 2012-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* The Apache License v2.0 is available at
* http://www.opensource.org/licenses/apache2.0.php
*
* You may elect to redistribute this code under either of these licenses.
*/
package org.eclipse.moquette.bundle;
import org.eclipse.moquette.server.Server;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Start and stop a configured version of the MQTT broker server.
*
* @author Didier Donsez
* @todo add config admin for port (in NettyAcceptor)
*/
public class Activator implements BundleActivator {
private static final Logger LOG = LoggerFactory.getLogger(Server.class);
private Server server = null;
public void start(BundleContext bundleContext) throws Exception {
server = new Server();
server.startServer();
LOG.info("Moquette MQTT broker started, version 0.7-SNAPSHOT");
}
public void stop(BundleContext bundleContext) throws Exception {
server.stopServer();
LOG.info("Moquette MQTT broker stopped, version 0.7-SNAPSHOT");
}
}
-1
View File
@@ -23,7 +23,6 @@
<module>netty_parser</module>
<module>broker</module>
<module>distribution</module>
<module>bundle</module>
</modules>
<reporting>