<?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.ftpix</groupId>
    <artifactId>sparknotation</artifactId>
    <version>1.17</version>

    <properties>
        <!-- github server corresponds to entry in ~/.m2/settings.xml -->
        <github.global.server>github</github.global.server>
        <skip.publish.process>true</skip.publish.process>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://raw.githubusercontent.com/lamarios/sparknotation/master/LICENSE</url>
        </license>
    </licenses>

    <name>${groupId}:${artifactId}</name>
    <description>Sparknotation is a library to use Sparkjava framework with annotation. It is useful when working on
        projects with a lot of endpoints where it sometimes becomes messy to deal with all these Spark.something
        methods. It also saves the hassle of always getting back parameters, query parameters and headers from the
        Request object.
    </description>
    <url>https://github.com/lamarios/sparknotation</url>

    <scm>
        <connection>scm:git:https://github.com/lamarios/sparknotation.git</connection>
        <url>https://github.com/lamarios/sparknotation</url>
    </scm>


    <developers>
        <developer>
            <name>Paul Fauchon</name>
            <email>p.fauchon@gmail.com</email>
        </developer>
    </developers>


    <!--    <distributionManagement>
            <repository>
                <id>internal.repo</id>
                <name>Temporary Staging Repository</name>
                <url>file://${project.build.directory}/mvn-repo</url>
            </repository>
        </distributionManagement>-->

    <dependencies>

        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-core</artifactId>
            <version>2.9.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/net.sf.scannotation/scannotation -->
        <dependency>
            <groupId>net.sf.scannotation</groupId>
            <artifactId>scannotation</artifactId>
            <version>1.0.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>javassist</artifactId>
                    <groupId>javassist</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.17.1</version>
        </dependency>

        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.28.0-GA</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.mashape.unirest</groupId>
            <artifactId>unirest-java</artifactId>
            <version>1.4.9</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-template-jade</artifactId>
            <version>2.7.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
<!--                    <forkCount>3</forkCount>-->
<!--                    <reuseForks>true</reuseForks>-->
                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
                </configuration>
            </plugin>
            <!-- Code coverage -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
                <configuration>
                </configuration>
            </plugin>

            <!-- Deployment stuff -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skip.publish.process}</skip>
                    <keyname>${gpg.keyname}</keyname>
                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipSource>${skip.publish.process}</skipSource>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skip.publish.process}</skip>
                    <source>8</source>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <skipStaging>${skip.publish.process}</skipStaging>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <!-- End of deployement stuff -->

        </plugins>
    </build>


    <profiles>
        <profile>
            <id>dist</id>
            <properties>
                <skip.publish.process>false</skip.publish.process>
            </properties>
        </profile>
    </profiles>
</project>
