<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>
    <parent>
        <groupId>edu.utexas.tacc.tapis</groupId>
        <artifactId>tapis-client-java</artifactId>
        <version>1.2</version>
    </parent>

    <artifactId>files-client</artifactId>

    <name>Tapis Files Client</name>
    <description>Java client for Files Service</description>


    <build>
        <sourceDirectory>src/main/java</sourceDirectory>

        <plugins>
            <!-- Build generated client code using openapi-generator -->
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>${openapi-generator-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <!-- Use the openapi spec here. Tapis live-docs website should also get spec from here -->
                            <inputSpec>https://raw.githubusercontent.com/tapis-project/tapis-files/master/api/src/main/resources/openapi.yaml</inputSpec>
                            <enablePostProcessFile>true</enablePostProcessFile>
                            <output>${project.build.directory}/generated-sources/openapi</output>
                            <generatorName>java</generatorName>
                            <groupId>edu.utexas.tacc.tapis</groupId>
                            <invokerPackage>edu.utexas.tacc.tapis.files.client.gen</invokerPackage>
                            <apiPackage>edu.utexas.tacc.tapis.files.client.gen.api</apiPackage>
                            <modelPackage>edu.utexas.tacc.tapis.files.client.gen.model</modelPackage>

                            <!-- Turn off generation of stuff we do not need -->
                            <generateApiTests>false</generateApiTests>
                            <generateApiDocumentation>false</generateApiDocumentation>
                            <generateModelTests>false</generateModelTests>
                            <generateModelDocumentation>false</generateModelDocumentation>
                            <configOptions>
                                <sourceFolder>src/gen/java/main</sourceFolder>
                                <!-- Use java 8 libraries instead of 3rd party libraries -->
                                <java8>true</java8>
                                <dateLibrary>java8</dateLibrary>
                            </configOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <finalName>files-client</finalName>
    </build>

</project>
