158 lines
6.8 KiB
XML
158 lines
6.8 KiB
XML
<?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/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>org.apache.doris</groupId>
|
|
<artifactId>remote-udf-java-demo</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<name>Remote UDF Demo in Java</name>
|
|
<url>https://doris.apache.org/</url>
|
|
<properties>
|
|
<protobuf.version>3.15.0</protobuf.version>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
<grpc.version>1.44.1</grpc.version>
|
|
<java.version>1.8</java.version>
|
|
<doris.thirdparty>${basedir}/../../../thirdparty</doris.thirdparty>
|
|
</properties>
|
|
<dependencies>
|
|
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-protobuf -->
|
|
<dependency>
|
|
<groupId>io.grpc</groupId>
|
|
<artifactId>grpc-protobuf</artifactId>
|
|
<version>${grpc.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.grpc</groupId>
|
|
<artifactId>grpc-stub</artifactId>
|
|
<version>${grpc.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.grpc</groupId>
|
|
<artifactId>grpc-netty-shaded</artifactId>
|
|
<version>${grpc.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<finalName>remote-udf-java-demo</finalName>
|
|
<plugins>
|
|
<!-- protobuf -->
|
|
<plugin>
|
|
<groupId>com.github.os72</groupId>
|
|
<artifactId>protoc-jar-maven-plugin</artifactId>
|
|
<version>3.11.1</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<configuration>
|
|
<protocCommand>${doris.thirdparty}/installed/bin/protoc</protocCommand>
|
|
<!-->You can use following protocArtifact instead of protocCommand, so that you don't need to install protobuf tools<-->
|
|
<!--protocArtifact>com.google.protobuf:protoc:${protobuf.version}</protocArtifact-->
|
|
<protocVersion>${protobuf.version}</protocVersion>
|
|
<inputDirectories>
|
|
<include>../remote-udf-java-demo/src/main/proto</include>
|
|
</inputDirectories>
|
|
<outputTargets>
|
|
<outputTarget>
|
|
<type>java</type>
|
|
</outputTarget>
|
|
<outputTarget>
|
|
<type>grpc-java</type>
|
|
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}</pluginArtifact>
|
|
</outputTarget>
|
|
</outputTargets>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- add gensrc java build src dir -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>add-source</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>add-source</goal>
|
|
</goals>
|
|
<configuration>
|
|
<sources>
|
|
<!-- add arbitrary num of src dirs here -->
|
|
<source>${basedir}/target/generated-sources/build/</source>
|
|
<source>${basedir}/target/generated-sources/</source>
|
|
</sources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.2.2</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<mainClass>org.apache.doris.udf.FunctionServiceDemo</mainClass>
|
|
</manifest>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<configuration>
|
|
<descriptorRefs>
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
</descriptorRefs>
|
|
<archive>
|
|
<manifest>
|
|
<mainClass>org.apache.doris.udf.FunctionServiceDemo</mainClass>
|
|
</manifest>
|
|
</archive>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<source>8</source>
|
|
<target>8</target>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|