<?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>org.lamblin</groupId>
    <artifactId>lamblin-parent</artifactId>
    <packaging>pom</packaging>
    <version>0.3.2</version>
    <name>lamblin-parent</name>
    <url>http://lamblin.org</url>
    <description>A REST Framework for Kotlin or Java applications deployed as AWS Lambdas.</description>


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

    <developers>
        <developer>
            <name>Borislav Shekerov</name>
            <email>shekerovborislav@gmail.com</email>
            <organization>org.lamblin</organization>
            <organizationUrl>http://www.lamblin.org</organizationUrl>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub Issue Tracker</system>
        <url>https://github.com/BorislavShekerov/lamblin/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/BorislavShekerov/lamblin.git</connection>
        <developerConnection>scm:git:git@github.com:BorislavShekerov/lamblin.git</developerConnection>
        <url>https://github.com/BorislavShekerov/lamblin</url>
      <tag>HEAD</tag>
  </scm>

    <properties>
        <kotlin.version>1.2.71</kotlin.version>
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
        <main.class>com.lamblin.core.Lamblin</main.class>

        <aws-lambda-java-events.version>2.2.6</aws-lambda-java-events.version>
        <aws-lambda-java-sdk.version>1.11.405</aws-lambda-java-sdk.version>
        <jackson-databind.version>2.9.6</jackson-databind.version>
        <logback-classic.version>1.2.3</logback-classic.version>
        <retrofit.version>2.4.0</retrofit.version>
        <guava.version>23.0</guava.version>

        <junit-jupiter.version>5.3.1</junit-jupiter.version>
        <assertj.version>3.11.1</assertj.version>
        <mockk.version>1.8.7</mockk.version>

        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <dokka-plugin.version>0.9.17</dokka-plugin.version>
    </properties>

    <pluginRepositories>

        <!-- Static Code Analysis -->
        <pluginRepository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-ozsie-maven</id>
            <name>bintray-plugins</name>
            <url>https://dl.bintray.com/ozsie/maven</url>
        </pluginRepository>

        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>


    <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>

    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>org.lamblin</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>1.0.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <format>html</format>
                    <maxmem>256m</maxmem>
                    <aggregate>true</aggregate>
                    <instrumentation>
                        <excludes>
                            <exclude>com/lamblin/plugin/core/*.class</exclude>
                            <exclude>com/lamblin/plugin/core/model/*.class</exclude>
                            <exclude>com/lamblin/core/exception/*.class</exclude>
                            <exclude>com/lamblin/example/lambda/*.class</exclude>
                            <exclude>com/lamblin/example/lambda/**/*.class</exclude>
                        </excludes>
                    </instrumentation>
                </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>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>lamblin-plugin</module>
                <module>lamblin-core</module>
                <module>lamblin-integration-test</module>
                <module>lamblin-test</module>
                <module>lamblin-local-runner</module>
                <module>lamblin-example</module>
            </modules>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <modules>
                <module>lamblin-plugin</module>
                <module>lamblin-core</module>
                <module>lamblin-test</module>
                <module>lamblin-local-runner</module>
            </modules>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jetbrains.dokka</groupId>
                        <artifactId>dokka-maven-plugin</artifactId>
                        <version>${dokka-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>dokka</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
