<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>io.micronaut.platform</groupId>
    <artifactId>micronaut-parent</artifactId>
    <version>4.1.2</version>
    <packaging>pom</packaging>
    <parent>
        <groupId>io.micronaut.platform</groupId>
        <artifactId>micronaut-platform</artifactId>
        <version>4.1.2</version>
    </parent>
    <name>Micronaut</name>
    <description>Natively Cloud Native</description>
    <url>https://micronaut.io</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>scm:git@github.com:micronaut-projects/micronaut-core.git</url>
        <connection>scm:git@github.com:micronaut-projects/micronaut-core.git</connection>
        <developerConnection>scm:git@github.com:micronaut-projects/micronaut-core.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <id>graemerocher</id>
            <name>Graeme Rocher</name>
        </developer>
    </developers>
    <properties>
        <jdk.version>17</jdk.version>
        <release.version>17</release.version>
        <maven.compiler.source>${jdk.version}</maven.compiler.source>
        <maven.compiler.target>${jdk.version}</maven.compiler.target>
        <maven.compiler.release>${release.version}</maven.compiler.release>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <exec.executable>java</exec.executable>
        <micronaut.version>4.1.2</micronaut.version>
        <graalvm.metadata-repository.enabled>true</graalvm.metadata-repository.enabled>
        <azure-functions-maven-plugin.version>1.27.0</azure-functions-maven-plugin.version>
        <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
        <function-maven-plugin.version>0.11.0</function-maven-plugin.version>
        <gmavenplus-plugin.version>3.0.0</gmavenplus-plugin.version>
        <jib-maven-plugin.version>3.3.2</jib-maven-plugin.version>
        <jrebel-maven-plugin.version>1.2.0</jrebel-maven-plugin.version>
        <maven.version>3.9.4</maven.version>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
        <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
        <maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
        <maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
        <maven-install-plugin.version>3.1.1</maven-install-plugin.version>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
        <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
        <micronaut-maven-plugin.version>4.0.6</micronaut-maven-plugin.version>
        <protoc-jar-maven-plugin.version>3.11.4</protoc-jar-maven-plugin.version>
        <grpc.kotlin.version>1.3.0</grpc.kotlin.version>
        <grpc.version>1.56.1</grpc.version>
        <picocli.version>4.7.4</picocli.version>
        <protobuf.gradle.version>0.9.3</protobuf.gradle.version>
        <protobuf.version>3.23.4</protobuf.version>
    </properties>
    <profiles>
        <profile>
            <id>graalvm</id>
            <activation>
                <file>
                    <exists>${env.JAVA_HOME}/bin/native-image</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.graalvm.sdk</groupId>
                    <artifactId>graal-sdk</artifactId>
                    <version>${graal.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.graalvm.nativeimage</groupId>
                    <artifactId>svm</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven-compiler-plugin.version}</version>
                        <configuration>
                            <annotationProcessorPaths combine.children="append">
                                <path>
                                    <groupId>io.micronaut</groupId>
                                    <artifactId>micronaut-graal</artifactId>
                                    <version>${micronaut.core.version}</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>io.micronaut.maven</groupId>
                    <artifactId>micronaut-maven-plugin</artifactId>
                    <version>${micronaut-maven-plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>com.github.os72</groupId>
                    <artifactId>protoc-jar-maven-plugin</artifactId>
                    <version>${protoc-jar-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <addProtoSources>all</addProtoSources>
                                <includeMavenTypes>direct</includeMavenTypes>
                                <inputDirectories>
                                    <include>src/main/proto</include>
                                </inputDirectories>
                                <outputTargets>
                                    <outputTarget>
                                        <type>java</type>
                                    </outputTarget>
                                    <outputTarget>
                                        <type>grpc-java</type>
                                        <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}</pluginArtifact>
                                    </outputTarget>
                                </outputTargets>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                    <configuration>
                        <arguments>
                            <argument>-classpath</argument>
                            <classpath/>
                            <argument>-XX:TieredStopAtLevel=1</argument>
                            <argument>-Dcom.sun.management.jmxremote</argument>
                            <argument>${exec.mainClass}</argument>
                        </arguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.google.cloud.functions</groupId>
                    <artifactId>function-maven-plugin</artifactId>
                    <version>${function-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.microsoft.azure</groupId>
                    <artifactId>azure-functions-maven-plugin</artifactId>
                    <version>${azure-functions-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>io.micronaut</groupId>
                                <artifactId>micronaut-inject-java</artifactId>
                                <version>${micronaut.core.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-failsafe-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven-shade-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>default-shade</id>
                            <configuration>
                                <createDependencyReducedPom>false</createDependencyReducedPom>
                                <transformers>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>${exec.mainClass}</mainClass>
                                    </transformer>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                </transformers>
                                <filters>
                                    <filter>
                                        <artifact>*.*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                            <exclude>module-info.class</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.graalvm.buildtools</groupId>
                    <artifactId>native-maven-plugin</artifactId>
                    <version>${maven.native.plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration combine.self="override">
                        <imageName>${project.artifactId}</imageName>
                        <mainClass>${exec.mainClass}</mainClass>
                        <buildArgs>
                            <buildArg>--no-fallback</buildArg>
                        </buildArgs>
                        <metadataRepository>
                            <enabled>${graalvm.metadata-repository.enabled}</enabled>
                        </metadataRepository>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.google.cloud.tools</groupId>
                    <artifactId>jib-maven-plugin</artifactId>
                    <version>${jib-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>io.micronaut.maven</groupId>
                            <artifactId>micronaut-maven-jib-integration</artifactId>
                            <version>${micronaut-maven-plugin.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <to>
                            <image>${project.artifactId}</image>
                        </to>
                        <pluginExtensions>
                            <pluginExtension>
                                <implementation>io.micronaut.maven.jib.JibMicronautExtension</implementation>
                            </pluginExtension>
                        </pluginExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>io.micronaut.maven</groupId>
                            <artifactId>micronaut-maven-enforcer-rules</artifactId>
                            <version>${micronaut-maven-plugin.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>micronaut-enforce</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <rules combine.children="append">
                            <requireJavaVersion>
                                <version>17</version>
                            </requireJavaVersion>
                            <checkSnakeYaml/>
                        </rules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.gmavenplus</groupId>
                    <artifactId>gmavenplus-plugin</artifactId>
                    <version>${gmavenplus-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>addSources</goal>
                                <goal>addTestSources</goal>
                                <goal>generateStubs</goal>
                                <goal>compile</goal>
                                <goal>generateTestStubs</goal>
                                <goal>compileTests</goal>
                                <goal>removeStubs</goal>
                                <goal>removeTestStubs</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <parameters>true</parameters>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.zeroturnaround</groupId>
                    <artifactId>jrebel-maven-plugin</artifactId>
                    <version>${jrebel-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>generate-rebel-xml</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
