<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<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>

    <parent>
        <groupId>org.eclipse.ee4j</groupId>
        <artifactId>project</artifactId>
        <version>1.0.9</version>
    </parent>

    <groupId>jakarta.data</groupId>
    <artifactId>jakarta.data-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>Jakarta Data</name>
    <description>Create the specification in Jakarta EE to help Jakarta EE developers create enterprise-grade
        applications applying Java® and data engine technologies. It helps them create scalable applications while
        maintaining low coupling with the underlying persistence technology.
    </description>
    <url>www.eclipse.org/ee4j/data</url>


    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/jakartaee/data.git</connection>
        <developerConnection>scm:git:ssh://github.com:jakartaee/data.git</developerConnection>
        <url>https://github.com/jakartaee/data</url>
    </scm>
    
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/jakartaee/data/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <name>Jakarta Data Developers</name>
            <email>data-dev@eclipse.org</email>
            <organization>Eclipse JakartaData</organization>
            <organizationUrl>https://accounts.eclipse.org/mailing-list/data-dev</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compile.version>3.13.0</maven.compile.version>
        <maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>
        <maven-javadoc-plugin.vesion>3.4.1</maven-javadoc-plugin.vesion>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven.checkstyle.plugin.version>3.3.1</maven.checkstyle.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- TODO update M/RC versions to GA versions when available -->
        <jakarta.annotation.version>3.0.0</jakarta.annotation.version>
        <jakarta.enterprise.cdi.version>4.1.0</jakarta.enterprise.cdi.version>   
        <jakarta.inject.version>2.0.1</jakarta.inject.version>     
        <jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
        <jakarta.json.version>2.1.3</jakarta.json.version>
        <jakarta.data.version>${project.version}</jakarta.data.version>
        <jakarta.servlet.version>6.1.0-M2</jakarta.servlet.version> 
        <jakarta.transaction.version>2.0.1</jakarta.transaction.version>
        <jakarta.validation.version>3.1.0-M2</jakarta.validation.version>

        <apache.rat.version>0.16.1</apache.rat.version>

        <arquillian.version>1.8.0.Final</arquillian.version>
        <junit.version>5.10.2</junit.version>
        <pi-test.version>1.16.0</pi-test.version>
        <pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>
        <checkstyle.version>10.16.0</checkstyle.version>
        <checkstyle.excludes></checkstyle.excludes>
        <jacoco.maven.version>0.8.12</jacoco.maven.version>
        <sigtest.version>2.3</sigtest.version>
        <sonar.jacoco.reportPath>../target/jacoco.exec</sonar.jacoco.reportPath>
        <sonar.maven.version>3.11.0.3922</sonar.maven.version>
    </properties>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compile.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.version}</version>
                <executions>
                    <execution>
                        <id>pre-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${sonar.jacoco.reportPath}</destFile>
                            <append>true</append>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>verify-style</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>**/module-info.java,${checkstyle.excludes}</excludes>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <consoleOutput>true</consoleOutput>
                    <configLocation>api/src/main/resources/checkstyle.xml</configLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>${apache.rat.version}</version>
                <configuration>
                    <includes>
                        <include>src/**/*.java</include>
                        <include>src/**/*.xml</include>
                        <include>pom.xml</include>
                    </includes>
                    <excludes>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>${pi-test.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-junit5-plugin</artifactId>
                        <version>${pitest-junit5-plugin.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludedMethods>
                        <excludedMethod>equals</excludedMethod>
                        <excludedMethod>hashCode</excludedMethod>
                        <excludedMethod>toString</excludedMethod>
                    </excludedMethods>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar.maven.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <nexusUrl>https://jakarta.oss.sonatype.org/</nexusUrl>
                            <serverId>ossrh</serverId>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>pitest</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <executions>
                            <execution>
                                <id>pitest</id>
                                <phase>test-compile</phase>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://jakarta.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://jakarta.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <modules>
        <module>api</module>
        <module>spec</module>
        <module>tck</module>
        <module>tck-dist</module>
    </modules>
</project>
