<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>ai.waii</groupId>
    <artifactId>waii-sdk-java</artifactId>
    <version>1.28.2</version>

    <name>Waii Java SDK</name>
    <description>Waii is the world's most accurate text2sql API</description>
    <url>http://www.waii.ai</url>

    <!-- License Information -->
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- Dev info needed by central -->
    <developers>
        <developer>
            <id>waii.ai</id>
            <name>Gunther Hagleitner</name>
            <email>gunther@waii.ai</email>
            <organization>Waii.ai</organization>
            <organizationUrl>http://www.waii.ai</organizationUrl>
        </developer>
    </developers>

    <!-- SCM info for central -->
    <scm>
        <connection>scm:git:git://github.com/waii-ai/waii-sdk-java.git</connection>
        <developerConnection>scm:git:ssh://github.com/waii-ai/waii-sdk-java.git</developerConnection>
        <url>https://github.com/waii-ai/waii-sdk-java</url>
    </scm>

    <!-- Dependencies -->
    <dependencies>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.6</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.30</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.7.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.7.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.11.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <!-- Add License File in META-INF -->
        <resources>
            <resource>
                <directory>${basedir}</directory>
                <includes>
                    <include>LICENSE-2.0.txt</include>
                </includes>
                <targetPath>META-INF</targetPath>
            </resource>
        </resources>

        <plugins>
            <!-- GPG Plugin for Signing -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <gpgArguments>
                                <arg>--batch</arg>
                                <arg>--yes</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- for central -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.5.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <!-- Intentionally disabling auto publish. After deployment, manually click on publish button in https://central.sonatype.com/publishing/deployments -->
                    <autoPublish>false</autoPublish>
                </configuration>
            </plugin>

            <!-- Source and Javadoc for central -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>false</skip>
                    <docletPath>${project.build.directory}/javadoc-bundle-options</docletPath>
                    <failOnError>false</failOnError>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
