You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2013/06/06 16:04:20 UTC

git commit: Update the pom with the latest dependencies and plugin dependencies

Updated Branches:
  refs/heads/trunk 7d76cc696 -> 1cb1fc929


Update the pom with the latest dependencies and plugin dependencies


Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/1cb1fc92
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/1cb1fc92
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/1cb1fc92

Branch: refs/heads/trunk
Commit: 1cb1fc92927000c5be3e0efed4732d25b3eabe9b
Parents: 7d76cc6
Author: Emmanuel Lécharny <el...@apache.org>
Authored: Thu Jun 6 16:03:51 2013 +0200
Committer: Emmanuel Lécharny <el...@apache.org>
Committed: Thu Jun 6 16:03:51 2013 +0200

----------------------------------------------------------------------
 benchmarks/.gitignore                              |   13 -
 benchmarks/pom.xml                                 |    1 -
 .../mina/core/nio/tcp/Mina3TcpBenchmarkServer.java |    3 +-
 benchmarks2/pom.xml                                |    1 -
 .../apache/mina/core/BenchmarkClientFactory.java   |    3 +
 .../core/nio/tcp/Netty4TcpBenchmarkServer.java     |  215 +++++----
 coap/pom.xml                                       |    4 +-
 codec/pom.xml                                      |    1 -
 core/pom.xml                                       |    1 -
 .../mina/transport/nio/AbstractNioSession.java     |    2 +-
 .../apache/mina/transport/nio/NioSelectorLoop.java |    2 +-
 examples/pom.xml                                   |    2 -
 http/pom.xml                                       |    1 -
 pom.xml                                            |  372 ++++++++++++++-
 protobuf/pom.xml                                   |   84 ++--
 thrift/pom.xml                                     |   82 ++--
 16 files changed, 564 insertions(+), 223 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks/.gitignore
----------------------------------------------------------------------
diff --git a/benchmarks/.gitignore b/benchmarks/.gitignore
deleted file mode 100644
index ca7d13f..0000000
--- a/benchmarks/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-.classpath
-.project
-.settings
-.wtpmodules
-*.ipr
-*.iws
-*.iml
-target/
-bin/
-*.log
-.deployables
-.clover
-

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml
index 0b6cf13..c63a6d1 100755
--- a/benchmarks/pom.xml
+++ b/benchmarks/pom.xml
@@ -41,7 +41,6 @@
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-core</artifactId>
-      <version>${mina.version}</version>
       <type>bundle</type>
       <scope>test</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
index c45ffb3..c8153a2 100755
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
@@ -30,6 +30,7 @@ import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkServer;
 import org.apache.mina.core.CounterFilter;
 import org.apache.mina.session.AttributeKey;
+import org.apache.mina.transport.nio.FixedSelectorLoopPool;
 import org.apache.mina.transport.nio.NioTcpServer;
 
 /**
@@ -61,7 +62,7 @@ public class Mina3TcpBenchmarkServer implements BenchmarkServer {
      * {@inheritDoc}
      */
     public void start(int port) throws IOException {
-        tcpServer = new NioTcpServer();
+        tcpServer = new NioTcpServer(new FixedSelectorLoopPool("Server", 1), null);
         tcpServer.getSessionConfig().setReadBufferSize(128 * 1024);
         tcpServer.getSessionConfig().setTcpNoDelay(true);
         tcpServer.setIoHandler(new IoHandler() {

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks2/pom.xml
----------------------------------------------------------------------
diff --git a/benchmarks2/pom.xml b/benchmarks2/pom.xml
index ddca0cd..ada0db8 100755
--- a/benchmarks2/pom.xml
+++ b/benchmarks2/pom.xml
@@ -41,7 +41,6 @@
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-core</artifactId>
-      <version>${mina.version}</version>
       <type>bundle</type>
       <scope>test</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks2/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
----------------------------------------------------------------------
diff --git a/benchmarks2/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java b/benchmarks2/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
index ecf00f7..b866d18 100755
--- a/benchmarks2/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
+++ b/benchmarks2/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
@@ -19,6 +19,7 @@
  */
 package org.apache.mina.core;
 
+import org.apache.mina.core.nio.tcp.Mina3TcpBenchmarkClient;
 import org.apache.mina.core.nio.tcp.Netty4TcpBenchmarkClient;
 import org.apache.mina.core.nio.udp.Netty4UdpBenchmarkClient;
 
@@ -35,6 +36,8 @@ public class BenchmarkClientFactory implements BenchmarkFactory<BenchmarkClient>
             return new Netty4TcpBenchmarkClient();
         case Netty4_udp:
             return new Netty4UdpBenchmarkClient();
+        case Mina3_tcp:
+            return new Mina3TcpBenchmarkClient();
         default:
             throw new IllegalArgumentException("Invalid type " + type);
         }

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/benchmarks2/src/test/java/org/apache/mina/core/nio/tcp/Netty4TcpBenchmarkServer.java
----------------------------------------------------------------------
diff --git a/benchmarks2/src/test/java/org/apache/mina/core/nio/tcp/Netty4TcpBenchmarkServer.java b/benchmarks2/src/test/java/org/apache/mina/core/nio/tcp/Netty4TcpBenchmarkServer.java
index e89afde..1fc1f12 100644
--- a/benchmarks2/src/test/java/org/apache/mina/core/nio/tcp/Netty4TcpBenchmarkServer.java
+++ b/benchmarks2/src/test/java/org/apache/mina/core/nio/tcp/Netty4TcpBenchmarkServer.java
@@ -19,16 +19,20 @@
  */
 package org.apache.mina.core.nio.tcp;
 
-import io.netty.bootstrap.ChannelFactory;
 import io.netty.bootstrap.ServerBootstrap;
 import io.netty.buffer.ByteBuf;
-import io.netty.buffer.UnpooledByteBufAllocator;
+import io.netty.buffer.MessageBuf;
+import io.netty.buffer.Unpooled;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelFuture;
 import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelInboundByteHandlerAdapter;
+import io.netty.channel.ChannelInitializer;
 import io.netty.channel.ChannelOption;
-import io.netty.channel.group.ChannelGroup;
-import io.netty.channel.group.DefaultChannelGroup;
-import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.channel.socket.SocketChannel;
+import io.netty.channel.socket.nio.NioEventLoopGroup;
 import io.netty.channel.socket.nio.NioServerSocketChannel;
+import io.netty.util.Attribute;
 import io.netty.util.AttributeKey;
 
 import java.io.IOException;
@@ -45,127 +49,130 @@ public class Netty4TcpBenchmarkServer implements BenchmarkServer {
         WAIT_FOR_FIRST_BYTE_LENGTH, WAIT_FOR_SECOND_BYTE_LENGTH, WAIT_FOR_THIRD_BYTE_LENGTH, WAIT_FOR_FOURTH_BYTE_LENGTH, READING
     }
 
-    private static final ByteBuf ACK = UnpooledByteBufAllocator.DEFAULT.buffer(1);
+    private static final ByteBuf ACK = Unpooled.buffer(1);
 
     static {
         ACK.writeByte(0);
     }
 
-    private static final String STATE_ATTRIBUTE = Netty4TcpBenchmarkServer.class.getName() + ".state";
+    private static final AttributeKey<State> STATE_ATTRIBUTE = new AttributeKey<State>("state");
 
-    private static final String LENGTH_ATTRIBUTE = Netty4TcpBenchmarkServer.class.getName() + ".length";
+    private static final AttributeKey<Integer> LENGTH_ATTRIBUTE = new AttributeKey<Integer>("length");
 
-    private ChannelFactory factory;
+    private class TestServerHandler extends ChannelInboundByteHandlerAdapter {
+        public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
+            System.out.println("childChannelOpen");
+            ctx.attr(STATE_ATTRIBUTE).set(State.WAIT_FOR_FIRST_BYTE_LENGTH);
+        }
 
-    private ChannelGroup allChannels = new DefaultChannelGroup();
+        @Override
+        public void channelUnregistered(ChannelHandlerContext ctx) throws Exception {
+        }
 
-    private static void setAttribute(ChannelHandlerContext ctx, String name, State value) {
-        AttributeKey<State> attribute = new AttributeKey<State>(name);
-        ctx.attr(attribute).set(value);
-    }
+        @Override
+        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+            cause.printStackTrace();
+        }
 
-    private static State getAttribute(ChannelHandlerContext ctx, String name) {
-        AttributeKey<State> attribute = new AttributeKey<State>(name);
-        return ctx.attr(attribute).get();
-    }
+        @Override
+        public void inboundBufferUpdated(ChannelHandlerContext ctx, ByteBuf buffer) throws Exception {
+            State state = ctx.attr(STATE_ATTRIBUTE).get();
+            int length = 0;
+            Attribute<Integer> lengthAttribute = ctx.attr(LENGTH_ATTRIBUTE);
 
-    /**
-     * {@inheritDoc}
-     */
-    public void start(int port) throws IOException {
-        ServerBootstrap bootstrap = new ServerBootstrap();
-        bootstrap.option(ChannelOption.SO_RCVBUF, 128 * 1024);
-        bootstrap.option(ChannelOption.TCP_NODELAY, true);
-        bootstrap.group(new NioEventLoopGroup(2));
-        bootstrap.channel(NioServerSocketChannel.class);
-        /*
-        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
-            public ChannelPipeline getPipeline() throws Exception {
-                return Channels.pipeline(new SimpleChannelUpstreamHandler() {
-                    @Override
-                    public void connect(ChannelHandlerContext ctx, ChildChannelStateEvent e) throws Exception {
-                        System.out.println("childChannelOpen");
-                        setAttribute(ctx, STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);
-                    }
+            if (lengthAttribute != null) {
+                length = lengthAttribute.get();
+            }
 
-                    @Override
-                    public void channelOpen(ChannelHandlerContext ctx, ) throws Exception {
-                        System.out.println("channelOpen");
-                        setAttribute(ctx, STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);
-                        allChannels.add(ctx.getChannel());
+            while (buffer.readableBytes() > 0) {
+                switch (state) {
+                case WAIT_FOR_FIRST_BYTE_LENGTH:
+                    length = (buffer.readByte() & 255) << 24;
+                    state = State.WAIT_FOR_SECOND_BYTE_LENGTH;
+                    break;
+
+                case WAIT_FOR_SECOND_BYTE_LENGTH:
+                    length += (buffer.readByte() & 255) << 16;
+                    state = State.WAIT_FOR_THIRD_BYTE_LENGTH;
+                    break;
+
+                case WAIT_FOR_THIRD_BYTE_LENGTH:
+                    length += (buffer.readByte() & 255) << 8;
+                    state = State.WAIT_FOR_FOURTH_BYTE_LENGTH;
+                    break;
+
+                case WAIT_FOR_FOURTH_BYTE_LENGTH:
+                    length += (buffer.readByte() & 255);
+                    state = State.READING;
+
+                    if ((length == 0) && (buffer.readableBytes() == 0)) {
+                        MessageBuf<Object> messageOut = ctx.nextOutboundMessageBuffer();
+                        messageOut.add(ACK.slice());
+                        ctx.flush();
+                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
                     }
 
-                    @Override
-                    public void inboundBufferUpdated(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
-                        if (e.getMessage() instanceof ByteBuf) {
-                            ByteBuf buffer = (ByteBuf) e.getMessage();
-
-                            State state = getAttribute(ctx, STATE_ATTRIBUTE);
-                            int length = 0;
-                            if (getAttributesMap(ctx).containsKey(LENGTH_ATTRIBUTE)) {
-                                length = (Integer) getAttribute(ctx, LENGTH_ATTRIBUTE);
-                            }
-                            while (buffer.readableBytes() > 0) {
-                                switch (state) {
-                                case WAIT_FOR_FIRST_BYTE_LENGTH:
-                                    length = (buffer.readByte() & 255) << 24;
-                                    state = State.WAIT_FOR_SECOND_BYTE_LENGTH;
-                                    break;
-                                case WAIT_FOR_SECOND_BYTE_LENGTH:
-                                    length += (buffer.readByte() & 255) << 16;
-                                    state = State.WAIT_FOR_THIRD_BYTE_LENGTH;
-                                    break;
-                                case WAIT_FOR_THIRD_BYTE_LENGTH:
-                                    length += (buffer.readByte() & 255) << 8;
-                                    state = State.WAIT_FOR_FOURTH_BYTE_LENGTH;
-                                    break;
-                                case WAIT_FOR_FOURTH_BYTE_LENGTH:
-                                    length += (buffer.readByte() & 255);
-                                    state = State.READING;
-                                    if ((length == 0) && (buffer.readableBytes() == 0)) {
-                                        ctx.getChannel().write(ACK.slice());
-                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
-                                    }
-                                    break;
-                                case READING:
-                                    int remaining = buffer.readableBytes();
-                                    if (length > remaining) {
-                                        length -= remaining;
-                                        buffer.skipBytes(remaining);
-                                    } else {
-                                        buffer.skipBytes(length);
-                                        ctx.getChannel().write(ACK.slice());
-                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
-                                        length = 0;
-                                    }
-                                }
-                            }
-                            setAttribute(ctx, STATE_ATTRIBUTE, state);
-                            setAttribute(ctx, LENGTH_ATTRIBUTE, length);
-                        }
+                    break;
+
+                case READING:
+                    int remaining = buffer.readableBytes();
+
+                    if (length > remaining) {
+                        length -= remaining;
+                        buffer.skipBytes(remaining);
+                    } else {
+                        buffer.skipBytes(length);
+                        MessageBuf<Object> messageOut = ctx.nextOutboundMessageBuffer();
+                        messageOut.add(ACK.slice());
+                        ctx.flush();
+                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
+                        length = 0;
                     }
+                }
+            }
 
-                    @Override
-                    public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
-                        allChannels.remove(ctx.getChannel());
-                    }
+            ctx.attr(STATE_ATTRIBUTE).set(state);
+            ctx.attr(LENGTH_ATTRIBUTE).set(length);
+        }
+    }
 
-                    @Override
-                    public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
-                        e.getCause().printStackTrace();
-                    }
-                });
-            }
-        });
-        allChannels.add(bootstrap.bind(new InetSocketAddress(port)));
-        */
+    /**
+     * {@inheritDoc}
+     * @throws  
+     */
+    public void start(int port) throws IOException {
+        ServerBootstrap bootstrap = null;
+        ;
+
+        try {
+            bootstrap = new ServerBootstrap();
+            bootstrap.option(ChannelOption.SO_RCVBUF, 128 * 1024);
+            bootstrap.option(ChannelOption.TCP_NODELAY, true);
+            bootstrap.group(new NioEventLoopGroup(), new NioEventLoopGroup());
+            bootstrap.channel(NioServerSocketChannel.class);
+            bootstrap.localAddress(port);
+            bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
+                @Override
+                public void initChannel(SocketChannel channel) throws Exception {
+                    channel.pipeline().addLast(new TestServerHandler());
+                };
+            });
+            ChannelFuture bindFuture = bootstrap.bind();
+            bindFuture.sync();
+            Channel channel = bindFuture.channel();
+            ChannelFuture closeFuture = channel.closeFuture();
+            //closeFuture.sync();
+        } catch (InterruptedException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } finally {
+            bootstrap.shutdown();
+        }
     }
 
     /**
      * {@inheritedDoc}
      */
     public void stop() throws IOException {
-        allChannels.disconnect().awaitUninterruptibly();
-        factory.releaseExternalResources();
     }
 }

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/coap/pom.xml
----------------------------------------------------------------------
diff --git a/coap/pom.xml b/coap/pom.xml
index 9d7e19a..adecb57 100644
--- a/coap/pom.xml
+++ b/coap/pom.xml
@@ -41,14 +41,13 @@
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-core</artifactId>
-      <version>${project.version}</version>
       <type>bundle</type>
     </dependency>
     
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-codec</artifactId>
-      <version>${project.version}</version>
+      <type>bundle</type>
     </dependency>
     
     <dependency>
@@ -56,6 +55,5 @@
       <artifactId>slf4j-impl</artifactId>
       <scope>runtime</scope>
     </dependency>
-    
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/codec/pom.xml
----------------------------------------------------------------------
diff --git a/codec/pom.xml b/codec/pom.xml
index 90e6484..02af71e 100644
--- a/codec/pom.xml
+++ b/codec/pom.xml
@@ -54,7 +54,6 @@
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
-       <version>2.2</version>
        <executions>
          <execution>
            <goals>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 0039e65..a603c08 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -49,7 +49,6 @@
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-codec</artifactId>
-      <version>${project.version}</version>
       <type>bundle</type>
     </dependency>
 

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java b/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java
index 6c2aa05..9a93512 100644
--- a/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java
+++ b/core/src/main/java/org/apache/mina/transport/nio/AbstractNioSession.java
@@ -157,7 +157,7 @@ public abstract class AbstractNioSession extends AbstractIoSession {
             writeRequest = sslHelper.processWrite(this, writeRequest.getMessage(), writeQueue);
         }
 
-        synchronized (writeQueue) {
+        /*synchronized (writeQueue)*/{
             ByteBuffer message = (ByteBuffer) writeRequest.getMessage();
 
             if (writeQueue.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/core/src/main/java/org/apache/mina/transport/nio/NioSelectorLoop.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/mina/transport/nio/NioSelectorLoop.java b/core/src/main/java/org/apache/mina/transport/nio/NioSelectorLoop.java
index 7dd2503..4ace7a7 100644
--- a/core/src/main/java/org/apache/mina/transport/nio/NioSelectorLoop.java
+++ b/core/src/main/java/org/apache/mina/transport/nio/NioSelectorLoop.java
@@ -49,7 +49,7 @@ public class NioSelectorLoop implements SelectorLoop {
     private Selector selector;
 
     /** Read buffer for all the incoming bytes (default to 64Kb) */
-    private final ByteBuffer readBuffer = ByteBuffer.allocate(64 * 1024);
+    private final ByteBuffer readBuffer = ByteBuffer.allocateDirect(64 * 1024);
 
     /** The queue containing the channels to register on the selector */
     private final Queue<Registration> registrationQueue = new ConcurrentLinkedQueue<Registration>();

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index e47552c..c5519cc 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -38,11 +38,9 @@
   </properties>
 
   <dependencies>
-    
       <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-core</artifactId>
-      <version>${project.version}</version>
       <type>bundle</type>
     </dependency>
     

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/http/pom.xml
----------------------------------------------------------------------
diff --git a/http/pom.xml b/http/pom.xml
index 2fc8dcd..51141dd 100644
--- a/http/pom.xml
+++ b/http/pom.xml
@@ -41,7 +41,6 @@
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mina-core</artifactId>
-      <version>${project.version}</version>
       <type>bundle</type>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 157711a..cb3b2b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,10 @@
   <name>Apache MINA ${project.version}</name>
   <packaging>pom</packaging>
 
+  <prerequisites>
+    <maven>3.0.0</maven>
+  </prerequisites>
+
   <url>http://mina.apache.org/</url>
   <inceptionYear>2009</inceptionYear>
 
@@ -103,17 +107,52 @@
 
 
   <modules>
-      <module>core</module>
-      <module>codec</module>
-      <module>http</module>
-      <module>examples</module>
-      <module>coap</module>
-      <module>thrift</module>
-      <module>protobuf</module>
+    <module>core</module>
+    <module>codec</module>
+    <module>http</module>
+    <module>examples</module>
+    <module>coap</module>
+    <module>thrift</module>
+    <module>protobuf</module>
   </modules>
 
   <dependencyManagement>
     <dependencies>
+      <!-- MINA dependencies -->
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>mina-core</artifactId>
+        <version>${project.version}</version>
+        <type>bundle</type>
+      </dependency>
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>mina-codec</artifactId>
+        <version>${project.version}</version>
+        <type>bundle</type>
+      </dependency>
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>mina-codec</artifactId>
+        <version>${project.version}</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>mina-http</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>mina-coap</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+
       <!-- Logging -->
       <dependency>
         <groupId>org.slf4j</groupId>
@@ -178,6 +217,325 @@
   </dependencies>
 
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <version>1.7</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <version>2.3</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-changes-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>2.9.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>2.4.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.5.1</version>
+          <configuration>
+            <source>1.6</source>
+            <target>1.6</target>
+            <optimize>true</optimize>
+            <showDeprecations>true</showDeprecations>
+            <encoding>ISO-8859-1</encoding>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.5</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.7</version>
+          <inherited>true</inherited>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-docck-plugin</artifactId>
+          <version>1.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-ear-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-eclipse-plugin</artifactId>
+          <version>2.9</version>
+          <inherited>true</inherited>
+          <configuration>
+            <downloadSources>true</downloadSources>
+            <downloadJavadocs>true</downloadJavadocs>
+          </configuration>
+        </plugin>
+
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-enforcer-plugin</artifactId>
+          <version>1.0.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-gpg-plugin</artifactId>
+          <version>1.4</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.3.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.4</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.8</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jxr-plugin</artifactId>
+          <version>2.3</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-plugin-plugin</artifactId>
+          <version>2.9</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-pmd-plugin</artifactId>
+          <version>2.6</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>2.4</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-release-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-remote-resources-plugin</artifactId>
+          <version>1.2.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>2.5</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-scm-plugin</artifactId>
+          <version>1.5</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-shade-plugin</artifactId>
+          <version>1.7.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-stage-plugin</artifactId>
+          <version>1.0-alpha-2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-report-plugin</artifactId>
+          <version>2.12.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12.2</version>
+          <configuration>
+            <argLine>-Xmx1024m</argLine>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>2.3.7</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.geronimo.genesis.plugins</groupId>
+          <artifactId>tools-maven-plugin</artifactId>
+          <version>1.4</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.8</version>
+          <configuration>
+            <excludeSubProjects>false</excludeSubProjects>
+            <excludes>
+              <!-- project excludes -->
+              <exclude>**/resources/svn_ignore.txt</exclude>
+              <exclude>**/resources/Reveal in Finder.launch</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>maven-xbean-plugin</artifactId>
+          <version>3.8</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>maven-xbean-plugin</artifactId>
+          <version>3.8</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.modello</groupId>
+          <artifactId>modello-maven-plugin</artifactId>
+          <version>1.5</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>build-helper-maven-plugin</artifactId>
+          <version>1.7</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>clirr-maven-plugin</artifactId>
+          <version>2.3</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>cobertura-maven-plugin</artifactId>
+          <version>2.5.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>dashboard-maven-plugin</artifactId>
+          <version>1.0.0-beta-1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>javancss-maven-plugin</artifactId>
+          <version>2.0</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>jdepend-maven-plugin</artifactId>
+          <version>2.0-beta-2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>l10n-maven-plugin</artifactId>
+          <version>1.0-alpha-2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>taglist-maven-plugin</artifactId>
+          <version>2.4</version>
+          <configuration>
+            <tags>
+              <tag>TODO</tag>
+              <tag>@todo</tag>
+              <tag>@deprecated</tag>
+              <tag>FIXME</tag>
+            </tags>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>versions-maven-plugin</artifactId>
+          <version>1.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>com.agilejava.docbkx</groupId>
+          <artifactId>docbkx-maven-plugin</artifactId>
+          <version>2.0.13</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/protobuf/pom.xml
----------------------------------------------------------------------
diff --git a/protobuf/pom.xml b/protobuf/pom.xml
index 2f400ac..6dcd5a4 100644
--- a/protobuf/pom.xml
+++ b/protobuf/pom.xml
@@ -19,54 +19,50 @@
 -->
 
 <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>
-    <parent>
-        <groupId>org.apache.mina</groupId>
-        <artifactId>mina-parent</artifactId>
-        <version>3.0.0-M1-SNAPSHOT</version>
-    </parent>
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>3.0.0-M1-SNAPSHOT</version>
+  </parent>
 
-    <artifactId>mina-protobuf</artifactId>
-    <name>Apache MINA Serialization::Protobuf ${project.version}</name>
-    <packaging>bundle</packaging>
+  <artifactId>mina-protobuf</artifactId>
+  <name>Apache MINA Serialization::Protobuf ${project.version}</name>
+  <packaging>bundle</packaging>
 
-    <properties>
-        <symbolicName>${project.groupId}.protobuf</symbolicName>
-        <exportedPackage>${project.groupId}</exportedPackage>
-        <protobuf.version>2.5.0</protobuf.version>
-    </properties>
+  <properties>
+    <symbolicName>${project.groupId}.protobuf</symbolicName>
+    <exportedPackage>${project.groupId}</exportedPackage>
+    <protobuf.version>2.5.0</protobuf.version>
+  </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>${protobuf.version}</version>
-            <scope>provided</scope>
-        </dependency>
+  <dependencies>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <version>${protobuf.version}</version>
+      <scope>provided</scope>
+    </dependency>
 
+    <dependency>
+      <groupId>org.apache.logging.log4j.adapters</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
 
-        <dependency>
-            <groupId>org.apache.logging.log4j.adapters</groupId>
-            <artifactId>slf4j-impl</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>mina-codec</artifactId>
-            <version>${project.version}</version>
-            <type>bundle</type>
-        </dependency>
-        
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>mina-codec</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-            <classifier>tests</classifier>
-        </dependency>
-        
-    </dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mina-codec</artifactId>
+      <type>bundle</type>
+    </dependency>
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mina-codec</artifactId>
+      <scope>test</scope>
+      <type>test-jar</type>
+    </dependency>
+  </dependencies>
 </project>
 

http://git-wip-us.apache.org/repos/asf/mina/blob/1cb1fc92/thrift/pom.xml
----------------------------------------------------------------------
diff --git a/thrift/pom.xml b/thrift/pom.xml
index 4e136dc..3264da3 100644
--- a/thrift/pom.xml
+++ b/thrift/pom.xml
@@ -20,51 +20,49 @@
 
 <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>
-    <parent>
-        <groupId>org.apache.mina</groupId>
-        <artifactId>mina-parent</artifactId>
-        <version>3.0.0-M1-SNAPSHOT</version>
-    </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>3.0.0-M1-SNAPSHOT</version>
+  </parent>
 
-    <artifactId>mina-thrift</artifactId>
-    <name>Apache MINA Serialization::Thrift ${project.version}</name>
-    <packaging>bundle</packaging>
+  <artifactId>mina-thrift</artifactId>
+  <name>Apache MINA Serialization::Thrift ${project.version}</name>
+  <packaging>bundle</packaging>
     
-    <properties>
-        <symbolicName>${project.groupId}.thrift</symbolicName>
-        <exportedPackage>${project.groupId}</exportedPackage>
-        <thrift.version>0.9.0</thrift.version>
-    </properties>
+  <properties>
+    <symbolicName>${project.groupId}.thrift</symbolicName>
+    <exportedPackage>${project.groupId}</exportedPackage>
+    <thrift.version>0.9.0</thrift.version>
+  </properties>
 
-    <dependencies>
-        
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j.adapters</groupId>
-            <artifactId>slf4j-impl</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>mina-codec</artifactId>
-            <type>bundle</type>
-            <version>${project.version}</version>
-        </dependency>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.thrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <version>${thrift.version}</version>
+      <scope>provided</scope>
+    </dependency>
 
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>mina-codec</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-            <classifier>tests</classifier>
-        </dependency>
-    </dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j.adapters</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+        
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mina-codec</artifactId>
+      <type>bundle</type>
+    </dependency>
+        
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mina-codec</artifactId>
+      <scope>test</scope>
+      <type>test-jar</type>
+    </dependency>
+  </dependencies>
 </project>