pom fix around gNMI

Change-Id: I6cd5190e7a9daa3d9050893d7b6195a01e549090
diff --git a/drivers/bmv2/pom.xml b/drivers/bmv2/pom.xml
index d9a9cf4..68391bf 100644
--- a/drivers/bmv2/pom.xml
+++ b/drivers/bmv2/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>onos-drivers-general</artifactId>
         <groupId>org.onosproject</groupId>
-        <version>1.11.0-SNAPSHOT</version>
+        <version>1.13.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -32,7 +32,7 @@
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-grpc-protocol-api</artifactId>
+            <artifactId>onos-protocols-grpc-api</artifactId>
             <version>${project.version}</version>
         </dependency>
 
@@ -44,11 +44,27 @@
 
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-incubator-bmv2-model</artifactId>
+            <artifactId>onos-protocols-p4runtime-api</artifactId>
             <version>${project.version}</version>
         </dependency>
 
-        <!-- protocols/p4runtime/api missing -->
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-protocols-p4runtime-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-drivers-p4runtime</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-pipelines-basic</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
     </dependencies>
 
diff --git a/drivers/gnmi/pom.xml b/drivers/gnmi/pom.xml
index ae046d6..b7d169e 100644
--- a/drivers/gnmi/pom.xml
+++ b/drivers/gnmi/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>onos-drivers-general</artifactId>
         <groupId>org.onosproject</groupId>
-        <version>1.11.0-SNAPSHOT</version>
+        <version>1.13.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -30,9 +30,16 @@
 
     <description>gNMI device drivers</description>
     <dependencies>
+
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-grpc-protocol-api</artifactId>
+            <artifactId>onos-protocols-grpc-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-protocols-gnmi-stub</artifactId>
             <version>${project.version}</version>
         </dependency>
 
diff --git a/drivers/p4runtime/pom.xml b/drivers/p4runtime/pom.xml
index ff48f14..c1af001 100644
--- a/drivers/p4runtime/pom.xml
+++ b/drivers/p4runtime/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <artifactId>onos-drivers-general</artifactId>
         <groupId>org.onosproject</groupId>
-        <version>1.11.0-SNAPSHOT</version>
+        <version>1.13.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -30,9 +30,10 @@
     
     <description>P4Runtime device drivers</description>
     <dependencies>
+
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-grpc-protocol-api</artifactId>
+            <artifactId>onos-protocols-grpc-api</artifactId>
             <version>${project.version}</version>
         </dependency>
 
@@ -42,6 +43,12 @@
             <version>1.3.1</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-protocols-p4runtime-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
         <!-- protocols/p4runtime/api missing -->
 
     </dependencies>
diff --git a/drivers/pom.xml b/drivers/pom.xml
index cfc590d..4bc4cc7 100644
--- a/drivers/pom.xml
+++ b/drivers/pom.xml
@@ -49,9 +49,11 @@
         <module>lisp</module>
         <module>flowspec</module>
         <module>oplink</module>
-        <!-- <module>bmv2</module> -->
+        <module>p4runtime</module>
+        <module>bmv2</module>
         <module>hp</module>
         <module>microsemi/ea1000</module>
+        <module>gnmi</module>
     </modules>
 
     <!--<properties>
diff --git a/incubator/grpc-dependencies/pom.xml b/incubator/grpc-dependencies/pom.xml
index 7ad4a10..98a8c8f 100644
--- a/incubator/grpc-dependencies/pom.xml
+++ b/incubator/grpc-dependencies/pom.xml
@@ -30,8 +30,8 @@
     <packaging>pom</packaging>
 
     <properties>
-        <grpc.version>1.2.0</grpc.version>
-        <grpc.package.version>1.2.0</grpc.package.version>
+        <grpc.version>1.3.1</grpc.version>
+        <grpc.package.version>1.3.1</grpc.package.version>
         <grpc.netty.version>4.1.8.Final</grpc.netty.version>
         <grpc.netty.package.version>4.1.8</grpc.netty.package.version>
         <google.auth.version>0.4.0</google.auth.version>
diff --git a/protocols/gnmi/stub/pom.xml b/protocols/gnmi/stub/pom.xml
new file mode 100644
index 0000000..f961f35
--- /dev/null
+++ b/protocols/gnmi/stub/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!--
+  ~ Copyright 2018-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+        xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-protocols</artifactId>
+        <version>1.13.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-protocols-gnmi-stub</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>ONOS gNMI API</description>
+    
+    <properties>
+        <protobuf.version>3.2.0</protobuf.version>
+        <grpc.version>1.3.1</grpc.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-protocols-p4runtime-proto</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+      <extensions>
+        <extension>
+          <groupId>kr.motd.maven</groupId>
+          <artifactId>os-maven-plugin</artifactId>
+          <version>1.5.0.Final</version>
+        </extension>
+      </extensions>
+      <plugins>
+        <plugin>
+          <groupId>org.xolstice.maven.plugins</groupId>
+          <artifactId>protobuf-maven-plugin</artifactId>
+          <version>0.5.0</version>
+          <configuration>
+            <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+            <pluginId>grpc-java</pluginId>
+            <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>compile</goal>
+                <goal>compile-custom</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </build>
+
+</project>
diff --git a/protocols/grpc/api/pom.xml b/protocols/grpc/api/pom.xml
index af2a8c5..7b661e1 100644
--- a/protocols/grpc/api/pom.xml
+++ b/protocols/grpc/api/pom.xml
@@ -19,7 +19,7 @@
          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">
     <parent>
-        <artifactId>onos-grpc-protocol</artifactId>
+        <artifactId>onos-protocols-grpc</artifactId>
         <groupId>org.onosproject</groupId>
         <version>1.13.0-SNAPSHOT</version>
     </parent>
@@ -27,7 +27,7 @@
 
     <packaging>bundle</packaging>
 
-    <artifactId>onos-grpc-protocol-api</artifactId>
+    <artifactId>onos-protocols-grpc-api</artifactId>
 
    <dependencies>
        <dependency>
diff --git a/protocols/grpc/ctl/pom.xml b/protocols/grpc/ctl/pom.xml
index f77c558..ddcaec1 100644
--- a/protocols/grpc/ctl/pom.xml
+++ b/protocols/grpc/ctl/pom.xml
@@ -19,13 +19,13 @@
          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">
     <parent>
-        <artifactId>onos-grpc-protocol</artifactId>
+        <artifactId>onos-protocols-grpc</artifactId>
         <groupId>org.onosproject</groupId>
         <version>1.11.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>onos-grpc-protocol-ctl</artifactId>
+    <artifactId>onos-protocols-grpc-ctl</artifactId>
 
     <packaging>bundle</packaging>
 
@@ -36,7 +36,7 @@
         </dependency>
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-grpc-protocol-api</artifactId>
+            <artifactId>onos-protocols-grpc-api</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
diff --git a/protocols/grpc/pom.xml b/protocols/grpc/pom.xml
index 13e2326..4b88ad5 100644
--- a/protocols/grpc/pom.xml
+++ b/protocols/grpc/pom.xml
@@ -25,7 +25,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>onos-grpc-protocol</artifactId>
+    <artifactId>onos-protocols-grpc</artifactId>
 
     <modules>
         <module>api</module>
diff --git a/protocols/p4runtime/ctl/pom.xml b/protocols/p4runtime/ctl/pom.xml
index 93d4e4c..81b5df8 100644
--- a/protocols/p4runtime/ctl/pom.xml
+++ b/protocols/p4runtime/ctl/pom.xml
@@ -41,7 +41,7 @@
         </dependency>
         <dependency>
             <groupId>org.onosproject</groupId>
-            <artifactId>onos-grpc-protocol-api</artifactId>
+            <artifactId>onos-protocols-grpc-api</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>