<?xml version="1.0" encoding="UTF-8"?>
<!--

    The MIT License
    Copyright © 2024-2026 Andy Miles

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.

-->
<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>com.amilesend</groupId>
    <artifactId>tvdb-java-client</artifactId>
    <version>4.1.8</version>

    <name>tvdb-java-client</name>
    <description>A swagger-generated TheTVDB v4 java client.</description>
    <inceptionYear>2024-2026</inceptionYear>
    <url>https://www.amilesend.com/tvdb-java-client/</url>
    <organization>
        <name>Andy Miles</name>
        <url>https://www.amilesend.com</url>
    </organization>
    <!-- Add License -->
    <developers>
        <developer>
            <id>amiles</id>
            <name>Andy Miles</name>
            <email>andy.miles@amilesend.com</email>
            <url>https://www.amilesend.com</url>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://mit-license.org/</url>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/andy-miles/tvdb-java-client.git</connection>
        <developerConnection>scm:git:https://github.com/andy-miles/tvdb-java-client.git</developerConnection>
        <url>https://github.com/andy-miles/tvdb-java-client</url>
    </scm>
    <profiles>
        <profile>
            <id>github</id>
            <distributionManagement>
                <repository>
                    <id>github</id>
                    <name>GitHub andy-miles Apache Maven Packages</name>
                    <url>https://maven.pkg.github.com/andy-miles/tvdb-java-client</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <autoPublish>false</autoPublish>
                            <checksums>all</checksums>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <maven.compiler.release>11</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <okhttp.version>5.3.2</okhttp.version>
        <spotbugs.version>4.9.8</spotbugs.version>
        <spotbugs.maven.plugin.version>4.9.8.2</spotbugs.maven.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.20.0</version>
        </dependency>
        <!-- JSON -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.13.2</version>
        </dependency>
        <dependency>
            <groupId>io.gsonfire</groupId>
            <artifactId>gson-fire</artifactId>
            <version>1.9.0</version>
        </dependency>
        <!-- HttpClient -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>${okhttp.version}</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp-jvm</artifactId>
            <version>${okhttp.version}</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>logging-interceptor</artifactId>
            <version>${okhttp.version}</version>
        </dependency>
        <!-- Additional dependencies for swagger -->
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>2.2.45</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.2</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6.3</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.21.0</version>
            </plugin>
            <plugin>
                <groupId>io.swagger.codegen.v3</groupId>
                <artifactId>swagger-codegen-maven-plugin</artifactId>
                <version>3.0.78</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/src/main/resources/swagger.yml</inputSpec>
                            <generateApis>true</generateApis>
                            <generateModels>true</generateModels>
                            <generateApiTests>false</generateApiTests>
                            <generateApiDocumentation>false</generateApiDocumentation>
                            <generateModelTests>false</generateModelTests>
                            <generateModelDocumentation>false</generateModelDocumentation>

                            <!-- Work around to generate java scaffolding, but omitting build support files. -->
                            <generateSupportingFiles>false</generateSupportingFiles>
                            <environmentVariables>
                                <supportingFiles>ApiCallback.java,ApiClient.java,ApiException.java,ApiResponse.java,Configuration.java,GzipRequestInterceptor.java,JSON.java,Pair.java,ProgressRequestBody.java,ProgressResponseBody.java,StringUtil.java,ApiKeyAuth.java,Authentication.java,HttpBasicAuth.java,OAuth.java,OAuthFlow.java</supportingFiles>
                            </environmentVariables>

                            <language>java</language>
                            <output>.</output>
                            <addCompileSourceRoot>false</addCompileSourceRoot>
                            <configOptions>
                                <sourceFolder>src/gen/java</sourceFolder>
                                <apiPackage>com.amilesend.tvdb.client.api</apiPackage>
                                <modelPackage>com.amilesend.tvdb.client.model</modelPackage>
                                <invokerPackage>com.amilesend.tvdb.client</invokerPackage>
                                <basePackage>com.amilesend.tvdb</basePackage>
                                <library>okhttp4-gson</library>
                                <dateLibrary>java11</dateLibrary>
                                <hideGenerationTimestamp>true</hideGenerationTimestamp>
                            </configOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.6.1</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/gen/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs.maven.plugin.version}</version>
                <configuration>
                    <includeFilterFile>src/main/spotbugs-include.xml</includeFilterFile>
                    <excludeFilterFile>src/main/spotbugs-exclude.xml</excludeFilterFile>
                    <plugins>
                        <plugin>
                            <groupId>com.h3xstream.findsecbugs</groupId>
                            <artifactId>findsecbugs-plugin</artifactId>
                            <version>1.12.0</version>
                        </plugin>
                    </plugins>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs</artifactId>
                        <version>${spotbugs.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <additionalJOption>-Xdoclint:none</additionalJOption>
                    <show>public</show>
                    <bottom>
                        <![CDATA[Copyright &#169; 2024-2026 <a href="https://www.amilesend.com">Andy Miles</a>. All rights reserved.]]>
                    </bottom>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>5.0.0</version>
                <configuration>
                    <properties>
                        <owner>Andy Miles</owner>
                        <email>andy.miles@amilesend.com</email>
                    </properties>
                    <licenseSets>
                        <licenseSet>
                            <header>com/mycila/maven/plugin/license/templates/MIT.txt</header>
                            <excludes>
                                <exclude>**/README</exclude>
                                <exclude>**/README.md</exclude>
                                <exclude>**/VERSION</exclude>
                                <exclude>**/.swagger-codegen-ignore</exclude>
                                <exclude>src/main/resources/**</exclude>
                                <exclude>src/test/resources/**</exclude>
                                <exclude>src/main/*.xml</exclude>
                                <exclude>src/gen/**</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.8.0</version>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <phase>package</phase>
                        <configuration>
                            <appendAssemblyId>true</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/docs-assemble.xml</descriptor>
                            </descriptors>
                        </configuration>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Required for maven-project-info-reports-plugin-3.8.0 for Doxia 2.0 stack -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.21.0</version>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs.maven.plugin.version}</version>
                <configuration>
                    <includeFilterFile>src/main/spotbugs-include.xml</includeFilterFile>
                    <excludeFilterFile>src/main/spotbugs-exclude.xml</excludeFilterFile>
                    <plugins>
                        <plugin>
                            <groupId>com.h3xstream.findsecbugs</groupId>
                            <artifactId>findsecbugs-plugin</artifactId>
                            <version>1.12.0</version>
                        </plugin>
                    </plugins>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.9.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <additionalJOption>-Xdoclint:-missing,-reference</additionalJOption>
                    <show>public</show>
                    <bottom>
                        <![CDATA[Copyright &#169; 2024-2026 <a href="https://www.amilesend.com">Andy Miles</a>. All rights reserved.
                        <br/>
                        Generated documentation is respective of <a href="https://thetvdb.com/">The TVDB</a>'s copyright.]]>
                    </bottom>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
