blob: a11ff1ebc57afebe06e12b883a32d4295e476a5e [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 User45d340c2018-01-09 01:56:13 +000024 <version>1.13.0-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>
Ray Milkey06e51b32017-12-13 11:30:13 -080033 <piCommit>13d611a9c655938676ebcde2bd5653b461f46ca7</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>
75 <version>1.1.1</version>
76 <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>
91 </configuration>
92 </execution>
93 <execution>
94 <id>checkout pi</id>
95 <goals>
96 <goal>exec</goal>
97 </goals>
98 <phase>initialize</phase>
99 <configuration>
100 <workingDirectory>target/PI</workingDirectory>
101 <executable>git</executable>
102 <arguments>
103 <argument>checkout</argument>
104 <!--<argument>&#45;&#45;quiet</argument>-->
105 <argument>-b</argument>
106 <argument>buck-build</argument>
107 <argument>${piCommit}</argument>
108 </arguments>
109 </configuration>
110 </execution>
111 <execution>
112 <id>submodule pi</id>
113 <goals>
114 <goal>exec</goal>
115 </goals>
116 <phase>initialize</phase>
117 <configuration>
118 <workingDirectory>target/PI</workingDirectory>
119 <executable>git</executable>
120 <arguments>
121 <argument>submodule</argument>
122 <argument>update</argument>
123 <!--<argument>&#45;&#45;quiet</argument>-->
124 <argument>--init</argument>
125 <argument>--recursive</argument>
126 </arguments>
127 </configuration>
128 </execution>
129 </executions>
130 </plugin>
131 <plugin>
132 <groupId>org.xolstice.maven.plugins</groupId>
133 <artifactId>protobuf-maven-plugin</artifactId>
134 <version>0.5.0</version>
135 <configuration>
136 <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
137 <pluginId>grpc</pluginId>
138 <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpccore.version}:exe:${os.detected.classifier}</pluginArtifact>
139 </configuration>
140 <executions>
141 <execution>
142 <goals>
143 <goal>compile</goal>
144 <goal>compile-custom</goal>
145 </goals>
146 <phase>generate-sources</phase>
147 <configuration>
148 <protoSourceRoot>${project.basedir}/target/PI/proto</protoSourceRoot>
149 <includes>
150 <include>p4/**/*.proto</include>
151 <include>google/rpc/*.proto</include>
152 </includes>
153 <excludes>
154 <exclude>openconfig/**/*.proto</exclude>
155 </excludes>
156 </configuration>
157 </execution>
158 </executions>
159 </plugin>
160 <plugin>
161 <groupId>org.codehaus.mojo</groupId>
162 <artifactId>build-helper-maven-plugin</artifactId>
163 <version>3.0.0</version>
164 <executions>
165 <execution>
166 <id>add-source</id>
167 <phase>generate-sources</phase>
168 <goals>
169 <goal>add-source</goal>
170 </goals>
171 <configuration>
172 <sources combine.children="append">
173 <source>${project.build.directory}/generated-sources/protobuf/grpc-java</source>
174 </sources>
175 </configuration>
176 </execution>
177 </executions>
178 </plugin>
179 <!--<plugin>-->
180 <!--<groupId>com.googlecode.maven-download-plugin</groupId>-->
181 <!--<artifactId>download-maven-plugin</artifactId>-->
Carmelo Casconeb1936bd2017-12-12 14:42:27 -0800182 <!--<version>1.3.1</version>-->
Sean Condonbf7d39b2017-11-04 18:34:53 +0000183 <!--<executions>-->
184 <!--<execution>-->
185 <!--<id>install-any</id>-->
186 <!--<phase>generate-resources</phase>-->
187 <!--<goals>-->
188 <!--<goal>wget</goal>-->
189 <!--</goals>-->
190 <!--<configuration>-->
191 <!--<url>https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/any.proto</url>-->
192 <!--<outputDirectory>${project.basedir}/target/PI/proto/googleapis/google/protobuf</outputDirectory>-->
193 <!--</configuration>-->
194 <!--</execution>-->
195 <!--</executions>-->
196 <!--</plugin>-->
197
198 </plugins>
199 </build>
200
201</project>