| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <artifactId>statefun-shaded</artifactId> |
| <groupId>org.apache.flink</groupId> |
| <version>3.2-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>statefun-protocol-shaded</artifactId> |
| <name>statefun-protocol-shaded</name> |
| <packaging>jar</packaging> |
| |
| <properties> |
| <protocol-messages.dir>${generated-sources.basedir}/protocol-messages/</protocol-messages.dir> |
| <proto-sources.dir>target/proto-sources</proto-sources.dir> |
| <protoc-jar-maven-plugin.version>3.11.1</protoc-jar-maven-plugin.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>statefun-sdk-protos</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>statefun-protobuf-shaded</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| |
| <!-- Step 1: (generate-sources) unpack protocol source proto files --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>unpack-protobuf</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>statefun-sdk-protos</artifactId> |
| <version>${project.version}</version> |
| <type>jar</type> |
| <outputDirectory>${proto-sources.dir}</outputDirectory> |
| <includes>sdk/*.proto,types/*.proto,io/*.proto</includes> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Step 2: (generate-sources) generate protocol java messages with protoc --> |
| <plugin> |
| <groupId>com.github.os72</groupId> |
| <artifactId>protoc-jar-maven-plugin</artifactId> |
| <version>${protoc-jar-maven-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>generate-protobuf-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <includeStdTypes>true</includeStdTypes> |
| <protocVersion>${protobuf.version}</protocVersion> |
| <cleanOutputFolder>true</cleanOutputFolder> |
| <inputDirectories> |
| <inputDirectory>src/main/protobuf</inputDirectory> |
| <inputDirectory>${proto-sources.dir}</inputDirectory> |
| </inputDirectories> |
| <outputDirectory>${protocol-messages.dir}</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${protocol-messages.dir}</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Step 3: (process-sources) shade Protobuf --> |
| <plugin> |
| <groupId>com.google.code.maven-replacer-plugin</groupId> |
| <artifactId>replacer</artifactId> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |