<?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>utils</artifactId>
    <version>0.1.0</version>
    <packaging>jar</packaging>
    <name>Contentstack-utils</name>
    <description>Java Utils SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach</description>
    <url>https://www.contentstack.com</url>
    <properties>
        <!-- package version -->
        <util.version>0.1.0-SNAPSHOT</util.version>
        <!-- UTF-8 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <!-- Compilation -->
        <java.version>1.8</java.version>
        <!-- Build Dependencies -->
        <build-helper.version>3.0.0</build-helper.version>
        <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.1.1</maven-javadoc-plugin.version>
        <kotlin-test-junit.version>1.4.10</kotlin-test-junit.version>
        <junit.version>4.13.1</junit.version>
        <maven-site-plugin.version>3.3</maven-site-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    </properties>

    <developers>
        <developer>
            <name>shaileshmishra</name>
            <email>shailesh.mishra@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>

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

    <issueManagement>
        <system>GitHub Issues</system>
        <url>http://github.com/contentstack/contentstack-utils-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>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin-test-junit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <version>${kotlin-test-junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.10.2</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180130</version>
        </dependency>
    </dependencies>


    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <plugins>
            <!--
            JaCoCo :: Maven Plugin
            The JaCoCo Maven Plugin provides the JaCoCo runtime agent to your tests and allows basic report creation.
            mvn clean install -P test-coverage
            -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>

                </executions>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
            <!--
            # 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-surefire-report-plugin</artifactId>
                <version>${surefire-report-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>report-only</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--The Source Plugin creates a jar archive of the source files of
            the current project. The jar file is, by default, created in the project's target directory.-->
            <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>

            <!--The Javadoc Plugin uses the Javadoc tool to generate javadocs for the specified project-->
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-javadoc-plugin</artifactId>-->
<!--                <version>${maven-javadoc-plugin.version}</version>-->
<!--            </plugin>-->

            <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>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                            <use>false</use>
                            <use>false</use>
                            <source>1.8</source>
                            <links>
                                <link>http://docs.oracle.com/javase/8/docs/api/</link>
                                <link>http://docs.oracle.com/javase/8/docs/api/</link>
                            </links>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <!--
            The Site Plugin is used to generate a site for the project.
            The generated site also includes the project's reports that were configured in the POM.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</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>${maven-gpg-plugin.version}</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 option during compilation
            -->

            <!--Provides support to access staging functionality in a remote Nexus Professional server.-->
<!--            <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>-->

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</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>0.8.5</version>-->
<!--            </plugin>-->

<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-compiler-plugin</artifactId>-->
<!--                <version>3.8.0</version>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <id>compile</id>-->
<!--                        <phase>compile</phase>-->
<!--                        <goals>-->
<!--                            <goal>compile</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                    <execution>-->
<!--                        <id>testCompile</id>-->
<!--                        <phase>test-compile</phase>-->
<!--                        <goals>-->
<!--                            <goal>testCompile</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--                <configuration>-->
<!--                    <source>${java.version}</source>-->
<!--                    <target>${java.version}</target>-->
<!--                    <compilerArgument>-Xlint:all</compilerArgument>-->
<!--                    <showWarnings>true</showWarnings>-->
<!--                    <showDeprecation>true</showDeprecation>-->
<!--                </configuration>-->
<!--            </plugin>-->

            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin-test-junit.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


        </plugins>
    </build>

</project>