blob: 7e16bad064fc5c01e6949876e295172f03d79922 [file] [log] [blame]
Sean Condonbf7d39b2017-11-04 18:34:53 +00001<?xml version="1.0"?>
2<!--
3 ~ Copyright 2015-present Open Networking Foundation
4 ~
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at
8 ~
9 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
16 -->
17<project
18 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
19 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
20 <modelVersion>4.0.0</modelVersion>
21 <parent>
22 <groupId>org.onosproject</groupId>
23 <artifactId>onos-protocols-p4runtime</artifactId>
24 <version>1.12.0-SNAPSHOT</version>
25 </parent>
26 <artifactId>onos-protocols-p4runtime-proto</artifactId>
27 <packaging>bundle</packaging>
28
29 <description>ONOS P4Runtime Proto</description>
30
31 <properties>
32 <os.detected.classifier>linux-x86_64</os.detected.classifier>
33 <protobuf.version>3.0.2</protobuf.version>
34 <piCommit>a8814a8ac40838a9df83fe47a17a025b69026fcf</piCommit>
35 <piBaseUrl>https://github.com/p4lang/PI.git</piBaseUrl>
36 </properties>
37
38 <dependencies>
39 <dependency>
40 <groupId>org.onosproject</groupId>
41 <artifactId>onos-protocols-p4runtime-api</artifactId>
42 <version>${project.version}</version>
43 </dependency>
44 <dependency>
45 <groupId>org.onosproject</groupId>
46 <artifactId>onos-incubator-grpc</artifactId>
47 <version>${project.version}</version>
48 </dependency>
49 <dependency>
50 <groupId>io.grpc</groupId>
51 <artifactId>grpc-core</artifactId>
52 <version>${grpccore.version}</version>
53 </dependency>
54 <dependency>
55 <groupId>com.google.protobuf</groupId>
56 <artifactId>protobuf-java</artifactId>
57 <version>${protobuf.version}</version>
58 </dependency>
59
60 </dependencies>
61
62 <build>
63 <plugins>
64 <plugin>
65 <groupId>org.codehaus.mojo</groupId>
66 <artifactId>exec-maven-plugin</artifactId>
67 <version>1.1.1</version>
68 <executions>
69 <execution>
70 <id>clone pi</id>
71 <goals>
72 <goal>exec</goal>
73 </goals>
74 <phase>initialize</phase>
75 <configuration>
76 <workingDirectory>target</workingDirectory>
77 <executable>git</executable>
78 <arguments>
79 <argument>clone</argument>
80 <!--<argument>&#45;&#45;quiet</argument>-->
81 <argument>${piBaseUrl}</argument>
82 </arguments>
83 </configuration>
84 </execution>
85 <execution>
86 <id>checkout pi</id>
87 <goals>
88 <goal>exec</goal>
89 </goals>
90 <phase>initialize</phase>
91 <configuration>
92 <workingDirectory>target/PI</workingDirectory>
93 <executable>git</executable>
94 <arguments>
95 <argument>checkout</argument>
96 <!--<argument>&#45;&#45;quiet</argument>-->
97 <argument>-b</argument>
98 <argument>buck-build</argument>
99 <argument>${piCommit}</argument>
100 </arguments>
101 </configuration>
102 </execution>
103 <execution>
104 <id>submodule pi</id>
105 <goals>
106 <goal>exec</goal>
107 </goals>
108 <phase>initialize</phase>
109 <configuration>
110 <workingDirectory>target/PI</workingDirectory>
111 <executable>git</executable>
112 <arguments>
113 <argument>submodule</argument>
114 <argument>update</argument>
115 <!--<argument>&#45;&#45;quiet</argument>-->
116 <argument>--init</argument>
117 <argument>--recursive</argument>
118 </arguments>
119 </configuration>
120 </execution>
121 </executions>
122 </plugin>
123 <plugin>
124 <groupId>org.xolstice.maven.plugins</groupId>
125 <artifactId>protobuf-maven-plugin</artifactId>
126 <version>0.5.0</version>
127 <configuration>
128 <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
129 <pluginId>grpc</pluginId>
130 <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpccore.version}:exe:${os.detected.classifier}</pluginArtifact>
131 </configuration>
132 <executions>
133 <execution>
134 <goals>
135 <goal>compile</goal>
136 <goal>compile-custom</goal>
137 </goals>
138 <phase>generate-sources</phase>
139 <configuration>
140 <protoSourceRoot>${project.basedir}/target/PI/proto</protoSourceRoot>
141 <includes>
142 <include>p4/**/*.proto</include>
143 <include>google/rpc/*.proto</include>
144 </includes>
145 <excludes>
146 <exclude>openconfig/**/*.proto</exclude>
147 </excludes>
148 </configuration>
149 </execution>
150 </executions>
151 </plugin>
152 <plugin>
153 <groupId>org.codehaus.mojo</groupId>
154 <artifactId>build-helper-maven-plugin</artifactId>
155 <version>3.0.0</version>
156 <executions>
157 <execution>
158 <id>add-source</id>
159 <phase>generate-sources</phase>
160 <goals>
161 <goal>add-source</goal>
162 </goals>
163 <configuration>
164 <sources combine.children="append">
165 <source>${project.build.directory}/generated-sources/protobuf/grpc-java</source>
166 </sources>
167 </configuration>
168 </execution>
169 </executions>
170 </plugin>
171 <!--<plugin>-->
172 <!--<groupId>com.googlecode.maven-download-plugin</groupId>-->
173 <!--<artifactId>download-maven-plugin</artifactId>-->
174 <!--<version>1.3.0</version>-->
175 <!--<executions>-->
176 <!--<execution>-->
177 <!--<id>install-any</id>-->
178 <!--<phase>generate-resources</phase>-->
179 <!--<goals>-->
180 <!--<goal>wget</goal>-->
181 <!--</goals>-->
182 <!--<configuration>-->
183 <!--<url>https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/any.proto</url>-->
184 <!--<outputDirectory>${project.basedir}/target/PI/proto/googleapis/google/protobuf</outputDirectory>-->
185 <!--</configuration>-->
186 <!--</execution>-->
187 <!--</executions>-->
188 <!--</plugin>-->
189
190 </plugins>
191 </build>
192
193</project>