diff --git a/all/pom.xml b/all/pom.xml
new file mode 100644
index 0000000000..8e0aea5251
--- /dev/null
+++ b/all/pom.xml
@@ -0,0 +1,218 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-all
+ jar
+
+ Stubby/All-in-One
+
+
+ ${project.build.directory}/src
+
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+ compile
+ true
+
+
+ ${project.groupId}
+ stubby-auth
+ ${project.version}
+ compile
+ true
+
+
+ ${project.groupId}
+ stubby-stub
+ ${project.version}
+ compile
+ true
+
+
+ ${project.groupId}
+ stubby-okhttp
+ ${project.version}
+ compile
+ true
+
+
+ ${project.groupId}
+ stubby-netty
+ ${project.version}
+ compile
+ true
+
+
+
+
+
+
+ maven-clean-plugin
+
+
+ clean-first
+ generate-resources
+
+ clean
+
+
+
+
+
+
+ maven-dependency-plugin
+
+
+
+ locate-dependencies
+ initialize
+
+ properties
+
+
+
+
+
+ unpack-sources
+ prepare-package
+
+ unpack-dependencies
+
+
+ sources
+ ${project.groupId}
+ ${generatedSourceDir}
+
+
+
+
+
+ unpack-jars
+ prepare-package
+
+ unpack-dependencies
+
+
+ ${project.groupId}
+ ${project.build.outputDirectory}
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ add-source
+ prepare-package
+
+ add-source
+
+
+
+ ${generatedSourceDir}
+
+
+
+
+
+
+
+
+ maven-jar-plugin
+
+
+ default-jar
+ none
+
+
+ all-in-one-jar
+ package
+
+ jar
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+ maven-jxr-plugin
+
+
+ generate-xref
+ package
+
+ jxr
+
+
+
+
+ true
+ ${project.build.directory}/xref
+ ${project.build.directory}/api
+ Stubby Source Xref (${project.version})
+ Stubby Source Xref (${project.version})
+
+
+
+
+
+ maven-javadoc-plugin
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+ true
+ ${project.build.directory}/api
+ Stubby API Reference (${project.version})
+ Stubby API Reference (${project.version})
+ false
+
+ -link http://docs.oracle.com/javaee/6/api/
+ -link
+ http://docs.oracle.com/javase/7/docs/api/
+ -link
+ http://docs.guava-libraries.googlecode.com/git-history/v18.0/javadoc/
+ -link
+ http://code.google.com/apis/protocolbuffers/docs/reference/java/
+ -link http://netty.io/5.0/api/
+ -link
+ http://square.github.io/okhttp/javadoc/
+
+ en_US
+
+
+
+
+
diff --git a/auth/pom.xml b/auth/pom.xml
new file mode 100644
index 0000000000..8ea087200b
--- /dev/null
+++ b/auth/pom.xml
@@ -0,0 +1,42 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-auth
+ jar
+
+ Stubby/Auth
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+ com.google.oauth-client
+ google-oauth-client
+
+
+ javax
+ javaee-api
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
diff --git a/checkstyle.license b/checkstyle.license
new file mode 100644
index 0000000000..9fde8da3ff
--- /dev/null
+++ b/checkstyle.license
@@ -0,0 +1,6 @@
+
+Copyright ${project.inceptionYear} ${project.organization.name} All rights reserved.
+
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file or at
+https://developers.google.com/open-source/licenses/bsd
\ No newline at end of file
diff --git a/checkstyle.xml b/checkstyle.xml
new file mode 100644
index 0000000000..8f4a9a899d
--- /dev/null
+++ b/checkstyle.xml
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/pom.xml b/core/pom.xml
new file mode 100644
index 0000000000..ad62510195
--- /dev/null
+++ b/core/pom.xml
@@ -0,0 +1,57 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-core
+ jar
+
+ Stubby/Core
+
+
+
+ com.google.protobuf
+ protobuf-java
+
+
+ com.google.guava
+ guava
+
+
+ com.google.code.findbugs
+ jsr305
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
+
+
+
+
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
+
+
+
diff --git a/integration-testing/pom.xml b/integration-testing/pom.xml
new file mode 100644
index 0000000000..f377a3e6bb
--- /dev/null
+++ b/integration-testing/pom.xml
@@ -0,0 +1,108 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-integration-testing
+ jar
+
+ Stubby/Integration Testing
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+ ${project.groupId}
+ stubby-netty
+ ${project.version}
+
+
+ ${project.groupId}
+ stubby-okhttp
+ ${project.version}
+
+
+ ${project.groupId}
+ stubby-stub
+ ${project.version}
+
+
+ ${project.groupId}
+ stubby-testing
+ ${project.version}
+
+
+ ${project.groupId}
+ test_proto_grpc
+ ${project.version}
+
+
+ junit
+ junit
+ compile
+
+
+
+
+
+
+
+ net.dongliu.prettypb
+ maven-protoc-plugin
+
+
+
+ compile
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+
+
+ install_test_proto_grpc
+ validate
+
+ install-file
+
+
+ ../lib/libtest_proto_grpc.jar
+ ${project.groupId}
+ test_proto_grpc
+ ${project.version}
+ jar
+
+
+
+
+
+
+
+ kr.motd.maven
+ exec-maven-plugin
+
+ ${java.home}/bin/java
+
+ ${argLine.bootcp}
+ -classpath
+ %classpath
+ ${exampleClass}
+ ${argLine.example}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/integration-testing/src/main/proto/stubby/testing/integration/empty.proto b/integration-testing/src/main/proto/stubby/testing/integration/empty.proto
new file mode 100644
index 0000000000..ad9f9e9a70
--- /dev/null
+++ b/integration-testing/src/main/proto/stubby/testing/integration/empty.proto
@@ -0,0 +1,22 @@
+//
+// Copyright 2014 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+syntax = "proto2";
+
+package proto2;
+
+option java_package = "com.google.protobuf";
+option java_outer_classname = "EmptyProtos";
+
+// An empty message that you can re-use to avoid defining duplicated empty
+// messages in your project. A typical example is to use it as argument or the
+// return value of a service API. For instance:
+//
+// service Foo {
+// rpc Bar (proto2.Empty) returns (proto2.Empty) { };
+// };
+message Empty {}
+
diff --git a/integration-testing/src/main/proto/stubby/testing/integration/message_set.proto b/integration-testing/src/main/proto/stubby/testing/integration/message_set.proto
new file mode 100644
index 0000000000..bca0ec25ce
--- /dev/null
+++ b/integration-testing/src/main/proto/stubby/testing/integration/message_set.proto
@@ -0,0 +1,19 @@
+//
+// Copyright 2014 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+syntax = "proto2";
+
+package proto2.bridge;
+
+option java_outer_classname = "MessageSetProtos";
+option java_multiple_files = true;
+option java_generate_equals_and_hash = true;
+
+message MessageSet {
+ option message_set_wire_format = true;
+ extensions 4 to max;
+}
+
diff --git a/integration-testing/src/main/proto/stubby/testing/integration/messages.proto b/integration-testing/src/main/proto/stubby/testing/integration/messages.proto
new file mode 100644
index 0000000000..4299537f04
--- /dev/null
+++ b/integration-testing/src/main/proto/stubby/testing/integration/messages.proto
@@ -0,0 +1,111 @@
+//
+// Copyright 2014 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+syntax = "proto2";
+
+package stubby.testing;
+
+import "stubby/testing/integration/message_set.proto";
+
+option java_package = "com.google.net.stubby.testing.integration";
+
+// The type of payload that should be returned.
+enum PayloadType {
+ // Compressable text format.
+ COMPRESSABLE = 0;
+
+ // Uncompressable binary format.
+ UNCOMPRESSABLE = 1;
+
+ // Randomly chosen from all other formats defined in this enum.
+ RANDOM = 2;
+}
+
+// A block of data, to simply increase message size.
+message Payload {
+ // The type of data in body.
+ optional PayloadType type = 1;
+ // Primary contents of payload.
+ optional bytes body = 2;
+}
+
+// Unary request.
+message SimpleRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, server randomly chooses one from other formats.
+ optional PayloadType response_type = 1;
+
+ // Desired payload size in the response from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 response_size = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+}
+
+// Unary response, as configured by the request.
+message SimpleResponse {
+ // Payload to increase message size.
+ optional Payload payload = 1;
+ // The user the request came from, for verifying authentication was
+ // successful when the client expected it.
+ optional int64 effective_gaia_user_id = 2;
+}
+
+message SimpleContext {
+ // Register MessageSet extension.
+ extend proto2.bridge.MessageSet {
+ optional SimpleContext message_set_extension = 71139615;
+ }
+ optional string value = 1;
+}
+
+// Client-streaming request.
+message StreamingInputCallRequest {
+ // Optional input payload sent along with the request.
+ optional Payload payload = 1;
+
+ // Not expecting any payload from the response.
+}
+
+// Client-streaming response.
+message StreamingInputCallResponse {
+ // Aggregated size of payloads received from the client.
+ optional int32 aggregated_payload_size = 1;
+}
+
+// Configuration for a particular response.
+message ResponseParameters {
+ // Desired payload sizes in responses from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 size = 1;
+
+ // Desired interval between consecutive responses in the response stream in
+ // microseconds.
+ optional int32 interval_us = 2;
+}
+
+// Server-streaming request.
+message StreamingOutputCallRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, the payload from each response in the stream
+ // might be of different types. This is to simulate a mixed type of payload
+ // stream.
+ optional PayloadType response_type = 1;
+
+ // Configuration for each expected response message.
+ repeated ResponseParameters response_parameters = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+}
+
+// Server-streaming response, as configured by the request and parameters.
+message StreamingOutputCallResponse {
+ // Payload to increase response size.
+ optional Payload payload = 1;
+}
+
diff --git a/lib/libtest_proto_grpc.jar b/lib/libtest_proto_grpc.jar
new file mode 100644
index 0000000000..9bccc61c86
Binary files /dev/null and b/lib/libtest_proto_grpc.jar differ
diff --git a/netty/pom.xml b/netty/pom.xml
new file mode 100644
index 0000000000..1b32b595d8
--- /dev/null
+++ b/netty/pom.xml
@@ -0,0 +1,55 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-netty
+ jar
+
+ Stubby/Netty
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+ io.netty
+ netty-codec-http2
+
+
+ com.twitter
+ hpack
+
+
+
+ ${project.groupId}
+ stubby-core
+ test-jar
+ ${project.version}
+ test
+
+
+ ${project.groupId}
+ stubby-testing
+ ${project.version}
+ test
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
diff --git a/okhttp/pom.xml b/okhttp/pom.xml
new file mode 100644
index 0000000000..e523d0114c
--- /dev/null
+++ b/okhttp/pom.xml
@@ -0,0 +1,42 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-okhttp
+ jar
+
+ Stubby/OkHttp
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+ com.squareup.okhttp
+ okhttp
+
+
+ com.squareup.okio
+ okio
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000..730e478f7b
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,365 @@
+
+ 4.0.0
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+ pom
+
+ Stubby
+ http://TBD.com
+
+
+ Stubby is a high-performance RPC framework based on HTTP/2.
+
+
+
+ Google Inc.
+ https://developers.google.com/
+
+
+ 2014
+
+
+
+ New BSD License
+ http://opensource.org/licenses/BSD-3-Clause
+
+
+
+
+ https://github.com/stubby/stubby-java
+ scm:git:git://github.com/google/stubby-java.git
+ scm:git:ssh://git@github.com/google/stubby-java.git
+
+ HEAD
+
+
+
+
+ jdk8
+
+ [1.8,)
+
+
+ 8.0.0.v20140317
+
+
+
+ alpn-7u40
+
+
+ java.version
+ 1.7.0_40
+
+
+
+ 7.0.0.v20140317
+
+
+
+ alpn-7u45
+
+
+ java.version
+ 1.7.0_45
+
+
+
+ 7.0.0.v20140317
+
+
+
+ alpn-7u51
+
+
+ java.version
+ 1.7.0_51
+
+
+
+ 1.1.6.v20130911
+ 7.0.0.v20140317
+
+
+
+ alpn-7u55
+
+
+ java.version
+ 1.7.0_55
+
+
+
+ 1.1.7.v20140316
+ 7.0.0.v20140317
+
+
+
+ alpn-7u60
+
+
+ java.version
+ 1.7.0_60
+
+
+
+ 7.0.0.v20140317
+
+
+
+ alpn-7u65
+
+
+ java.version
+ 1.7.0_65
+
+
+
+ 7.0.0.v20140317
+
+
+
+ alpn-7u67
+
+
+ java.version
+ 1.7.0_67
+
+
+
+ 7.0.0.v20140317
+
+
+
+
+
+ UTF-8
+ UTF-8
+ 2.0.1-SNAPSHOT
+ 5.0.0.Alpha2-SNAPSHOT
+ 8.0.0.v20140317
+
+ ${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${jetty.alpn.version}/alpn-boot-${jetty.alpn.version}.jar
+
+ -Xbootclasspath/p:${jetty.alpn.path}
+
+
+
+ core
+ stub
+ auth
+ okhttp
+ netty
+ testing
+ integration-testing
+ all
+
+
+
+
+
+ com.google.protobuf
+ protobuf-java
+ 2.6.1
+
+
+ com.squareup.okhttp
+ okhttp
+ ${okhttp.version}
+
+
+ com.squareup.okio
+ okio
+ 1.0.1
+
+
+ io.netty
+ netty-codec-http2
+ ${netty.version}
+
+
+ com.twitter
+ hpack
+ 0.9.1
+
+
+ com.google.guava
+ guava
+ 18.0
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.0
+
+
+ javax
+ javaee-api
+ 7.0
+
+
+ com.google.oauth-client
+ google-oauth-client
+ 1.18.0-rc
+
+
+
+ org.eclipse.jetty.alpn
+ alpn-api
+ 1.0.0
+
+
+ org.mortbay.jetty.alpn
+ alpn-boot
+ ${jetty.alpn.version}
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+ org.mockito
+ mockito-core
+ 1.10.8
+ test
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.9.1
+
+
+ maven-clean-plugin
+ 2.6
+
+
+ maven-javadoc-plugin
+ 2.10.1
+
+
+ maven-jar-plugin
+ 2.5
+
+
+ maven-compiler-plugin
+ 3.1
+
+
+ org.codehaus.mojo
+ animal-sniffer-maven-plugin
+ 1.11
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-dependency-plugin
+ 2.8
+
+
+ maven-jxr-plugin
+ 2.2
+
+
+ maven-antrun-plugin
+ 1.6
+
+
+ kr.motd.maven
+ exec-maven-plugin
+ 1.0.0.Final
+
+
+ maven-checkstyle-plugin
+ 2.13
+
+
+ net.dongliu.prettypb
+ maven-protoc-plugin
+ 0.3.2
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.6
+ 1.6
+
+ -Xlint:unchecked
+ -Xlint:deprecation
+
+
+
+
+
+
+ org.codehaus.mojo
+ animal-sniffer-maven-plugin
+
+
+ check-java-version
+ verify
+
+ check
+
+
+
+ org.codehaus.mojo.signature
+ java16
+ 1.1
+
+
+
+ java.util.zip.Deflater
+
+
+
+
+
+
+
+
+
+
+
+
+ maven-dependency-plugin
+
+
+ get-alpn-boot
+ validate
+
+ get
+
+
+ org.mortbay.jetty.alpn
+ alpn-boot
+ ${jetty.alpn.version}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/run-test-client.sh b/run-test-client.sh
new file mode 100755
index 0000000000..75808fc84a
--- /dev/null
+++ b/run-test-client.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+TARGET='Test Service Client'
+TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceClient'
+TARGET_ARGS="$@"
+
+cd "`dirname "$0"`"/integration-testing
+echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)"
+exec mvn -q -nsu compile exec:exec -Dcheckstyle.skip=true -DexampleClass="$TARGET_CLASS" -DargLine.example="$TARGET_ARGS"
\ No newline at end of file
diff --git a/run-test-server.sh b/run-test-server.sh
new file mode 100755
index 0000000000..da14129eba
--- /dev/null
+++ b/run-test-server.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+TARGET='Test Service Server'
+TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceServer'
+TARGET_ARGS="$@"
+
+cd "`dirname "$0"`"/integration-testing
+echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)"
+exec mvn -q -nsu compile exec:exec -Dcheckstyle.skip=true -DexampleClass="$TARGET_CLASS" -DargLine.example="$TARGET_ARGS"
\ No newline at end of file
diff --git a/stub/pom.xml b/stub/pom.xml
new file mode 100644
index 0000000000..7881ad6088
--- /dev/null
+++ b/stub/pom.xml
@@ -0,0 +1,34 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-stub
+ jar
+
+ Stubby/Stub
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
diff --git a/testing/pom.xml b/testing/pom.xml
new file mode 100644
index 0000000000..a73676952b
--- /dev/null
+++ b/testing/pom.xml
@@ -0,0 +1,32 @@
+
+ 4.0.0
+
+
+ com.google.net.stubby
+ stubby-parent
+ 1.0-SNAPSHOT
+
+
+ stubby-testing
+ jar
+
+ Stubby/Testing
+
+
+
+ ${project.groupId}
+ stubby-core
+ ${project.version}
+
+
+
+ junit
+ junit
+
+
+ org.mockito
+ mockito-core
+
+
+