<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>cc.gasches.archetypes</groupId>
    <artifactId>micronaut-archetypes</artifactId>
    <packaging>pom</packaging>
    <version>1.1.0.M2</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Micronaut service app archetype</description>
    <url>https://github.com/gasches/micronaut-service-archetype</url>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Semyon Gashchenko</name>
            <email>semyon.gashchenko@gmail.com</email>
            <organizationUrl>https://gasches.cc/</organizationUrl>
        </developer>
    </developers>
    <scm>
        <url>https://github.com/gasches/micronaut-service-archetype</url>
        <connection>scm:git:git@github.com:gasches/micronaut-service-archetype.git</connection>
        <developerConnection>scm:git:git@github.com:gasches/micronaut-service-archetype.git</developerConnection>
    </scm>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <resources-plugin.version>3.0.2</resources-plugin.version>
        <archetype-plugin.version>3.0.1</archetype-plugin.version>
        <archetype-packaging.version>3.0.1</archetype-packaging.version>
        <staging-maven-plugin.version>1.6.8</staging-maven-plugin.version>
        <source-plugin.version>3.0.1</source-plugin.version>
        <javadoc-plugin.version>3.0.1</javadoc-plugin.version>
        <gpg-plugin.version>1.6</gpg-plugin.version>

        <jdk.version>1.8</jdk.version>
        <micronaut.version>${project.version}</micronaut.version>
        <maven-wrapper.version>3.5.3</maven-wrapper.version>
        <gradle-wrapper.version>4.10</gradle-wrapper.version>
        <kotlin.version>1.2.61</kotlin.version>
        <logback.version>1.2.3</logback.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>${archetype-plugin.version}</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${resources-plugin.version}</version>
                    <configuration>
                        <addDefaultExcludes>false</addDefaultExcludes>
                        <encoding>UTF-8</encoding>
                        <escapeString>\</escapeString>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${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.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>micronaut-java-service</module>
        <module>micronaut-java-cli</module>
        <module>micronaut-java-function-aws</module>
        <module>micronaut-kotlin-service</module>
        <module>micronaut-kotlin-cli</module>
        <module>micronaut-groovy-service</module>
        <module>micronaut-groovy-cli</module>
    </modules>
</project>
