blob: 4cc3a3dfc9910d119bdbe97afa9b5b01e195ed74 [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 Userf09ad742018-10-23 23:30:10 +000024 <version>1.14.2-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 Casconef645e842018-07-16 18:31:52 +020033 <piCommit>7e94b025bac6db63bc8534e5dd21a008984e38bc</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>
Sean Condonbf7d39b2017-11-04 18:34:53 +0000181
182 </plugins>
183 </build>
184
185</project>