| <?xml version="1.0"?> |
| <!-- |
| ~ Copyright 2015-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-p4runtime</artifactId> |
| <version>1.13.8-SNAPSHOT</version> |
| </parent> |
| <artifactId>onos-protocols-p4runtime-proto</artifactId> |
| <packaging>bundle</packaging> |
| |
| <description>ONOS P4Runtime Proto</description> |
| |
| <properties> |
| <protobuf.version>3.2.0</protobuf.version> |
| <piCommit>219b3d67299ec09b49f433d7341049256ab5f512</piCommit> |
| <piBaseUrl>https://github.com/p4lang/PI.git</piBaseUrl> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.onosproject</groupId> |
| <artifactId>onos-protocols-p4runtime-api</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.onosproject</groupId> |
| <artifactId>onos-incubator-grpc</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-core</artifactId> |
| <version>${grpccore.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java</artifactId> |
| <version>${protobuf.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.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.6.0</version> |
| <executions> |
| <execution> |
| <id>clone pi</id> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <phase>initialize</phase> |
| <configuration> |
| <workingDirectory>target</workingDirectory> |
| <executable>git</executable> |
| <arguments> |
| <argument>clone</argument> |
| <!--<argument>--quiet</argument>--> |
| <argument>${piBaseUrl}</argument> |
| </arguments> |
| <!-- 128: if it was already there, treat as ok --> |
| <successCodes>0,128</successCodes> |
| </configuration> |
| </execution> |
| <execution> |
| <id>checkout pi</id> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <phase>initialize</phase> |
| <configuration> |
| <workingDirectory>target/PI</workingDirectory> |
| <executable>git</executable> |
| <arguments> |
| <argument>checkout</argument> |
| <!--<argument>--quiet</argument>--> |
| <argument>-B</argument> |
| <argument>buck-build</argument> |
| <argument>${piCommit}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>submodule pi</id> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <phase>initialize</phase> |
| <configuration> |
| <workingDirectory>target/PI</workingDirectory> |
| <executable>git</executable> |
| <arguments> |
| <argument>submodule</argument> |
| <argument>update</argument> |
| <!--<argument>--quiet</argument>--> |
| <argument>--init</argument> |
| <argument>--recursive</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <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</pluginId> |
| <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpccore.version}:exe:${os.detected.classifier}</pluginArtifact> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>compile</goal> |
| <goal>compile-custom</goal> |
| </goals> |
| <phase>generate-sources</phase> |
| <configuration> |
| <protoSourceRoot>${project.basedir}/target/PI/proto</protoSourceRoot> |
| <includes> |
| <include>p4/**/*.proto</include> |
| <include>google/rpc/*.proto</include> |
| </includes> |
| <excludes> |
| <exclude>openconfig/**/*.proto</exclude> |
| </excludes> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>3.0.0</version> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources combine.children="append"> |
| <source>${project.build.directory}/generated-sources/protobuf/grpc-java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!--<plugin>--> |
| <!--<groupId>com.googlecode.maven-download-plugin</groupId>--> |
| <!--<artifactId>download-maven-plugin</artifactId>--> |
| <!--<version>1.3.1</version>--> |
| <!--<executions>--> |
| <!--<execution>--> |
| <!--<id>install-any</id>--> |
| <!--<phase>generate-resources</phase>--> |
| <!--<goals>--> |
| <!--<goal>wget</goal>--> |
| <!--</goals>--> |
| <!--<configuration>--> |
| <!--<url>https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/any.proto</url>--> |
| <!--<outputDirectory>${project.basedir}/target/PI/proto/googleapis/google/protobuf</outputDirectory>--> |
| <!--</configuration>--> |
| <!--</execution>--> |
| <!--</executions>--> |
| <!--</plugin>--> |
| |
| </plugins> |
| </build> |
| |
| </project> |