<?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>com.contentstack.sdk</groupId>
    <artifactId>java</artifactId>
    <version>1.11.0</version>
    <packaging>jar</packaging>
    <name>contentstack-java</name>
    <description>Java SDK for Contentstack Content Delivery API</description>
    <url>https://github.com/contentstack/contentstack-java/</url>


    <properties>
        <sdk.version.release>1.11.0-SNAPSHOT</sdk.version.release>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <surefire-report-plugin.version>2.22.0</surefire-report-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <dotenv-source.version>2.3.1</dotenv-source.version>
        <rxjava-source.version>3.1.5</rxjava-source.version>
        <retrofit-source.version>2.9.0</retrofit-source.version>
        <converter-gson-source.version>2.9.0</converter-gson-source.version>
        <loggin.version>4.10.0</loggin.version>
        <jococo-plugin.version>0.8.5</jococo-plugin.version>
        <lombok-source.version>1.18.24</lombok-source.version>
        <junit-jupiter.version>5.9.1</junit-jupiter.version>
        <junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
        <junit-vintage-engine.version>5.9.1</junit-vintage-engine.version>
        <gson.version>2.8.8</gson.version>
        <json-simple-version>1.1.1</json-simple-version>
        <maven-site-plugin.version>3.3</maven-site-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
        <json-version>20220924</json-version>
        <jacoco-maven-plugin-version>0.8.7</jacoco-maven-plugin-version>
        <maven-release-plugin-version>2.5.3</maven-release-plugin-version>
        <contentstack-utils-version>1.2.0</contentstack-utils-version>
    </properties>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <scm>
        <url>https://github.com/contentstack/contentstack-java</url>
        <connection>scm:git:git://github.com/contentstack/contentstack-java.git</connection>
        <developerConnection>scm:git:ssh://github.com:contentstack/contentstack-java.git</developerConnection>
        <tag>java-1.8.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>http://github.com/contentstack/contentstack-java/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>MIT</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <organization>
        <name>Contentstack.</name>
        <url>http://contentstack.com</url>
    </organization>

    <developers>
        <developer>
            <name>shaileshmishra</name>
            <email>shailesh.mishra@contentstack.com</email>
            <organization>contentstack</organization>
            <organizationUrl>https://www.contentstack.com/</organizationUrl>
        </developer>

        <developer>
            <name>contentstack</name>
            <email>mobile@contentstack.com</email>
            <organization>Contentstack</organization>
            <organizationUrl>https://www.contentstack.com/</organizationUrl>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>


    <dependencies>
        <dependency>
            <groupId>com.contentstack.sdk</groupId>
            <artifactId>utils</artifactId>
            <version>${contentstack-utils-version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${json-version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.github.cdimascio</groupId>
            <artifactId>dotenv-java</artifactId>
            <version>${dotenv-source.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava3</groupId>
            <artifactId>rxjava</artifactId>
            <version>${rxjava-source.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
            <version>${retrofit-source.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>converter-gson</artifactId>
            <version>${converter-gson-source.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>logging-interceptor</artifactId>
            <version>${loggin.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok-source.version}</version>
            <scope>compile</scope>
        </dependency>
        <!--JUnit 5 requires Java 8, you should make sure you have it ready in your environment.-->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit-vintage-engine.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>${json-simple-version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <!--
            # Run tests and generate .xml reports
            mvn test
            # Convert .xml reports into .html report, but without the CSS or images
            mvn surefire-report:report-only
            # Put the CSS and images where they need to be without the rest of the
            # time-consuming stuff
            mvn surefire-report:report site -DgenerateReports=false
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--Generate overview.html file-->
            <!-- -overview "/Users/shaileshmishra/Documents/workspace/contentstack/javaspace/contentstack-java/src/main/overview.html" -bottom  "<b>Copyright © 2012-2022 Contentstack </b><sup>TM</sup>" -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
                            <show>public</show>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                            <use>false</use>
                            <use>false</use>
                            <source>1.8</source>
                            <links>
                                <link>http://docs.oracle.com/javase/7/docs/api/</link>
                                <link>http://docs.oracle.com/javase/7/docs/api/</link>
                            </links>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
            </plugin>
            <!--
            Signs all of a project's attached artifacts with GnuPG.
            You need to have previously configured the default key.
            gpg also needs to be on the search path.
            -->
            <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>
                    </execution>
                </executions>
            </plugin>
            <!--
            Sometimes when you may need to compile a certain project to a different
            version than what you are currently using. The javac can accept such command
            using -source and -target. The Compiler Plugin can also be configured to
            provide these options during compilation
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgument>
                        -Xlint:all,-serial,-processing
                    </compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <!--
            This plugin is used to release a project with Maven, saving a lot of repetitive, manual work.
            Releasing a project is made in two steps: prepare and perform.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin-version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin-version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>target/jacoco.exec</dataFile>
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>src/main/java/com/contentstack/sdk/Group.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/FetchAssetsCallback.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/SingleQueryResultCallback.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/ContentTypesCallback.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/QueryResultsCallBack.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/EntryResultCallBack.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
                        <exclude>src/main/java/com/contentstack/sdk/TestLivePreview.class</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
        </plugins>
    </build>

</project>