blob: 22725e050b2cdae2780c1ea7003b50b70aca4ff5 [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>
ONOS Jenkins User0efc8492018-12-11 17:20:53 +000024 <version>1.13.8-SNAPSHOT</version>
Sean Condonbf7d39b2017-11-04 18:34:53 +000025 </parent>
26 <artifactId>onos-protocols-p4runtime-proto</artifactId>
27 <packaging>bundle</packaging>
28
29 <description>ONOS P4Runtime Proto</description>
30
31 <properties>
Andrea Campanella8bcd5862017-12-11 11:34:45 +010032 <protobuf.version>3.2.0</protobuf.version>
Carmelo Cascone384a93a2018-04-12 10:37:55 -070033 <piCommit>219b3d67299ec09b49f433d7341049256ab5f512</piCommit>
Sean Condonbf7d39b2017-11-04 18:34:53 +000034 <piBaseUrl>https://github.com/p4lang/PI.git</piBaseUrl>
35 </properties>
36
37 <dependencies>
38 <dependency>
39 <groupId>org.onosproject</groupId>
40 <artifactId>onos-protocols-p4runtime-api</artifactId>
41 <version>${project.version}</version>
42 </dependency>
43 <dependency>
44 <groupId>org.onosproject</groupId>
45 <artifactId>onos-incubator-grpc</artifactId>
46 <version>${project.version}</version>
47 </dependency>
48 <dependency>
49 <groupId>io.grpc</groupId>
50 <artifactId>grpc-core</artifactId>
51 <version>${grpccore.version}</version>
52 </dependency>
53 <dependency>
54 <groupId>com.google.protobuf</groupId>
55 <artifactId>protobuf-java</artifactId>
56 <version>${protobuf.version}</version>
57 </dependency>
58
59 </dependencies>
60
61 <build>
Yuta HIGUCHIda1e1992017-11-13 18:48:31 -080062
63 <extensions>
64 <extension>
65 <groupId>kr.motd.maven</groupId>
66 <artifactId>os-maven-plugin</artifactId>
67 <version>1.5.0.Final</version>
68 </extension>
69 </extensions>
70
Sean Condonbf7d39b2017-11-04 18:34:53 +000071 <plugins>
72 <plugin>
73 <groupId>org.codehaus.mojo</groupId>
74 <artifactId>exec-maven-plugin</artifactId>
Yuta HIGUCHIe46f0932018-02-02 18:25:29 -080075 <version>1.6.0</version>
Sean Condonbf7d39b2017-11-04 18:34:53 +000076 <executions>
77 <execution>
78 <id>clone pi</id>
79 <goals>
80 <goal>exec</goal>
81 </goals>
82 <phase>initialize</phase>
83 <configuration>
84 <workingDirectory>target</workingDirectory>
85 <executable>git</executable>
86 <arguments>
87 <argument>clone</argument>
88 <!--<argument>&#45;&#45;quiet</argument>-->
89 <argument>${piBaseUrl}</argument>
90 </arguments>
Yuta HIGUCHIe46f0932018-02-02 18:25:29 -080091 <!-- 128: if it was already there, treat as ok -->
92 <successCodes>0,128</successCodes>
Sean Condonbf7d39b2017-11-04 18:34:53 +000093 </configuration>
94 </execution>
95 <execution>
96 <id>checkout pi</id>
97 <goals>
98 <goal>exec</goal>
99 </goals>
100 <phase>initialize</phase>
101 <configuration>
102 <workingDirectory>target/PI</workingDirectory>
103 <executable>git</executable>
104 <arguments>
105 <argument>checkout</argument>
106 <!--<argument>&#45;&#45;quiet</argument>-->
Yuta HIGUCHIe46f0932018-02-02 18:25:29 -0800107 <argument>-B</argument>
Sean Condonbf7d39b2017-11-04 18:34:53 +0000108 <argument>buck-build</argument>
109 <argument>${piCommit}</argument>
110 </arguments>
111 </configuration>
112 </execution>
113 <execution>
114 <id>submodule pi</id>
115 <goals>
116 <goal>exec</goal>
117 </goals>
118 <phase>initialize</phase>
119 <configuration>
120 <workingDirectory>target/PI</workingDirectory>
121 <executable>git</executable>
122 <arguments>
123 <argument>submodule</argument>
124 <argument>update</argument>
125 <!--<argument>&#45;&#45;quiet</argument>-->
126 <argument>--init</argument>
127 <argument>--recursive</argument>
128 </arguments>
129 </configuration>
130 </execution>
131 </executions>
132 </plugin>
133 <plugin>
134 <groupId>org.xolstice.maven.plugins</groupId>
135 <artifactId>protobuf-maven-plugin</artifactId>
136 <version>0.5.0</version>
137 <configuration>
138 <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
139 <pluginId>grpc</pluginId>
140 <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpccore.version}:exe:${os.detected.classifier}</pluginArtifact>
141 </configuration>
142 <executions>
143 <execution>
144 <goals>
145 <goal>compile</goal>
146 <goal>compile-custom</goal>
147 </goals>
148 <phase>generate-sources</phase>
149 <configuration>
150 <protoSourceRoot>${project.basedir}/target/PI/proto</protoSourceRoot>
151 <includes>
152 <include>p4/**/*.proto</include>
153 <include>google/rpc/*.proto</include>
154 </includes>
155 <excludes>
156 <exclude>openconfig/**/*.proto</exclude>
157 </excludes>
158 </configuration>
159 </execution>
160 </executions>
161 </plugin>
162 <plugin>
163 <groupId>org.codehaus.mojo</groupId>
164 <artifactId>build-helper-maven-plugin</artifactId>
165 <version>3.0.0</version>
166 <executions>
167 <execution>
168 <id>add-source</id>
169 <phase>generate-sources</phase>
170 <goals>
171 <goal>add-source</goal>
172 </goals>
173 <configuration>
174 <sources combine.children="append">
175 <source>${project.build.directory}/generated-sources/protobuf/grpc-java</source>
176 </sources>
177 </configuration>
178 </execution>
179 </executions>
180 </plugin>
181 <!--<plugin>-->
182 <!--<groupId>com.googlecode.maven-download-plugin</groupId>-->
183 <!--<artifactId>download-maven-plugin</artifactId>-->
Carmelo Casconeb1936bd2017-12-12 14:42:27 -0800184 <!--<version>1.3.1</version>-->
Sean Condonbf7d39b2017-11-04 18:34:53 +0000185 <!--<executions>-->
186 <!--<execution>-->
187 <!--<id>install-any</id>-->
188 <!--<phase>generate-resources</phase>-->
189 <!--<goals>-->
190 <!--<goal>wget</goal>-->
191 <!--</goals>-->
192 <!--<configuration>-->
193 <!--<url>https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/any.proto</url>-->
194 <!--<outputDirectory>${project.basedir}/target/PI/proto/googleapis/google/protobuf</outputDirectory>-->
195 <!--</configuration>-->
196 <!--</execution>-->
197 <!--</executions>-->
198 <!--</plugin>-->
199
200 </plugins>
201 </build>
202
203</project>