<?xml version="1.0" encoding="utf-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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>triton.client</groupId>
    <artifactId>java-api</artifactId>
    <version>0.0.1</version>
    <name>triton_java_api</name>
    <packaging>jar</packaging>
    <description>Java API for Triton Inference server.</description>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpasyncclient</artifactId>
            <version>4.1.5</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.15.2</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>30.1.1-jre</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-SimpleInferClient</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <archive>
                                <manifest>
                                    <mainClass>triton.client.examples.SimpleInferClient</mainClass>
                                </manifest>
                            </archive>
                            <finalName>SimpleInferClient</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <outputDirectory>${dir}</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>build-SimpleInferPerf</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <archive>
                                <manifest>
                                    <mainClass>triton.client.examples.SimpleInferPerf</mainClass>
                                </manifest>
                            </archive>
                            <finalName>SimpleInferPerf</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <outputDirectory>${dir}</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>build-MemoryGrowthTest</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <archive>
                                <manifest>
                                    <mainClass>triton.client.examples.MemoryGrowthTest</mainClass>
                                </manifest>
                            </archive>
                            <finalName>MemoryGrowthTest</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <outputDirectory>${dir}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
