<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>org.hibernate.infra.develocity</groupId>
    <artifactId>hibernate-develocity-maven-extension</artifactId>
    <packaging>jar</packaging>
    <version>3.4.2.Final</version>
    <name>Hibernate Develocity extension for Maven Projects</name>
    <description>A Maven extension to configure the Develocity build cache for the Hibernate projects using Maven as a build tool.</description>
    <url>https://github.com/hibernate/hibernate-develocity-maven-extension</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <local.staging.root.directory>${maven.multiModuleProjectDirectory}/target/staging-deploy</local.staging.root.directory>

        <develocity-maven-extension.version>2.6.1</develocity-maven-extension.version>
        <!--
            When updating maven version:
             - Adjust the Jenkins files to reference the same version
             - Regenerate the maven wrapper with mvn wrapper:wrapper
         -->
        <maven-core.version>3.10.0</maven-core.version>
        <plexus-component.version>2.2.0</plexus-component.version>
        <sisu-inject.version>1.1.1</sisu-inject.version>
        <junit.version>6.1.3</junit.version>

        <maven-compiler-plugin.version>3.16.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.6.1</maven-surefire-plugin.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
        <!-- Run mvn wrapper:wrapper when updating the wrapper plugin version -->
        <maven-wrapper-plugin.version>3.3.4</maven-wrapper-plugin.version>
        <maven-deploy-plugin.version>3.2.0</maven-deploy-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven-core.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-annotations</artifactId>
            <version>${plexus-component.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven-surefire-plugin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.gradle</groupId>
            <artifactId>develocity-maven-extension</artifactId>
            <version>${develocity-maven-extension.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-wrapper-plugin</artifactId>
                <version>${maven-wrapper-plugin.version}</version>
                <configuration>
                    <mavenVersion>${maven-core.version}</mavenVersion>
                    <distributionType>bin</distributionType>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.eclipse.sisu</groupId>
                            <artifactId>org.eclipse.sisu.inject</artifactId>
                            <version>${sisu-inject.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.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <version>${plexus-component.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</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>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
                    </transformers>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven-deploy-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

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

    <developers>
        <developer>
            <id>gsmet</id>
            <name>Guillaume Smet</name>
            <email>guillaume.smet@gmail.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>http://www.redhat.com/</organizationUrl>
        </developer>
    </developers>

    <ciManagement>
        <system>Jenkins</system>
        <url>http://ci.hibernate.org/</url>
    </ciManagement>

    <scm>
        <url>https://github.com/hibernate/hibernate-develocity-maven-extension</url>
        <connection>scm:git:git@github.com:hibernate/hibernate-develocity-maven-extension.git</connection>
        <developerConnection>scm:git:git@github.com:hibernate/hibernate-develocity-maven-extension.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/hibernate/hibernate-develocity-maven-extension/issues</url>
    </issueManagement>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <altDeploymentRepository>local::file:${local.staging.root.directory}/maven</altDeploymentRepository>
            </properties>
            <build>
                <plugins>
                    <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>
                            <execution>
                                <id>attach-test-sources</id>
                                <goals>
                                    <goal>test-jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
                                    <goal>javadoc</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${local.staging.root.directory}/documentation/</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
