<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2022, 2026 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>2.0.0-M1</version>
    </parent>

    <groupId>jakarta.data</groupId>
    <artifactId>jakarta.data-parent</artifactId>
    <version>1.1.0-M2</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>https://projects.eclipse.org/projects/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>21</maven.compiler.release>
        <maven.compiler.source>21</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven.antrun.plugin.version>3.2.0</maven.antrun.plugin.version>
        <maven.compile.version>3.15.0</maven.compile.version>
        <maven.dependency.plugin.version>3.9.0</maven.dependency.plugin.version>
        <maven.surefire.plugin.version>3.5.4</maven.surefire.plugin.version>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.4.0</maven.source.plugin.version>
        <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
        <maven.pmd.plugin.version>3.28.0</maven.pmd.plugin.version>
        <maven.bundle.plugin.version>6.0.0</maven.bundle.plugin.version>
        <maven.jar.plugin.version>3.5.0</maven.jar.plugin.version>
        
        <lifecycle.mapping.version>1.0.0</lifecycle.mapping.version>

        <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.persistence.version>4.0.0-M1</jakarta.persistence.version>
        <jakarta.nosql.version>1.0.1</jakarta.nosql.version>
        <jakarta.servlet.version>6.1.0</jakarta.servlet.version> 
        <jakarta.transaction.version>2.0.1</jakarta.transaction.version>
        <jakarta.validation.version>3.1.1</jakarta.validation.version>

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

        <arquillian.version>1.10.0.Final</arquillian.version>
        <arquillian.jakarta.version>10.0.0.Final</arquillian.jakarta.version>
        <shrinkwrap.version>1.2.6</shrinkwrap.version>
        <shrinkwrap.resolver.version>3.3.4</shrinkwrap.resolver.version>
        
        <exec.maven.plugin.version>3.6.3</exec.maven.plugin.version>
        <checkstyle.version>13.1.0</checkstyle.version>
        <jacoco.maven.version>0.8.14</jacoco.maven.version>
        
        <junit.version>6.0.2</junit.version>
        
        <pi.test.version>1.22.1</pi.test.version>
        <pitest.junit5.plugin.version>1.2.3</pitest.junit5.plugin.version>
        
        <sigtest.version>2.6</sigtest.version>
        
        <sonar.jacoco.reportPath>../target/jacoco.exec</sonar.jacoco.reportPath>
        <sonar.maven.version>5.5.0.6356</sonar.maven.version>

        <nexus.staging.repository>data-maven2-staging</nexus.staging.repository>
        
        <!-- Allow TCK populator classes to exceed max MethodLength -->
        <!-- Allow static metamodel constants -->
        <checkstyle.excludes>**/*Populator.java,**/_*.java</checkstyle.excludes>

        <!-- 
            TODO - remove once parent is updated 
                   https://github.com/eclipse-ee4j/ee4j/pull/115/
        -->
        <central.plugin.version>1.4.2</central.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>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${arquillian.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.jakarta</groupId>
                <artifactId>arquillian-jakarta-bom</artifactId>
                <version>${arquillian.jakarta.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-bom</artifactId>
                <version>${shrinkwrap.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                <artifactId>shrinkwrap-resolver-bom</artifactId>
                <version>${shrinkwrap.resolver.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- 
                TODO - remove once parent is updated 
                        https://github.com/eclipse-ee4j/ee4j/pull/115/
                -->
                <plugin>
                    <groupId>org.eclipse.cbi.central</groupId>
                    <artifactId>central-staging-plugins</artifactId>
                    <version>${central.plugin.version}</version>
                </plugin>
                <!-- 
                TODO - remove once parent is updated 
                        https://github.com/eclipse-ee4j/ee4j/pull/115/
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar.maven.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <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-source-plugin</artifactId>
                <version>${maven.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-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>
    </build>

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

        <!-- 
          TODO - remove once parent is updated 
                 https://github.com/eclipse-ee4j/ee4j/pull/115/
        -->
        <profile>
            <id>stage-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-maven</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireMavenVersion>
                                            <version>[3.2.5,)</version>
                                            <message>Maven 3.0 through 3.0.3 inclusive does not pass
                                                correct settings.xml to Maven Release Plugin.</message>
                                        </requireMavenVersion>
                                    </rules>
                                </configuration>
                            </execution>
                            <execution>
                                <id>enforce-property</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireProperty>
                                            <property>nexus.staging.repository</property>
                                            <message>
                                                You must set the 'nexus.staging.repository' system property
                                                For example, -Dnexus.staging.repository=data-maven2-staging on the command line
                                                in order to use this profile.
                                            </message>
                                        </requireProperty>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <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>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <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-deploy-plugin</artifactId>
                        <configuration>
                            <altReleaseDeploymentRepository>
                                repo3.eclipse.org::default::https://repo3.eclipse.org/repository/${nexus.staging.repository}/
                            </altReleaseDeploymentRepository>
                            <deployAtEnd>true</deployAtEnd> <!-- Do not deploy if build failure -->
                            <skip>snapshots</skip>          <!-- Skip if SNAPSHOT version - Disallow staging SNAPSHOT-->
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- 
          TODO - remove once parent is updated 
                 https://github.com/eclipse-ee4j/ee4j/pull/115/
        -->
        <profile>
            <id>promote-stage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-property</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireProperty>
                                            <property>nexus.staging.repository</property>
                                            <message>
                                                You must set the 'nexus.staging.repository' system property
                                                For example, -Dynexus.staging.repository=data-maven2-staging on the command line
                                                in order to use this profile.
                                            </message>
                                        </requireProperty>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin> <!-- Skip the default deploy plugin -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                            <configuration>
                                <skip>true</skip>
                            </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.eclipse.cbi.central</groupId>
                        <artifactId>central-staging-plugins</artifactId>
                        <executions>
                            <execution>
                                <id>sync-to-central</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>rc-sync</goal>
                                </goals>
                                <configuration>
                                    <bearerCreate>true</bearerCreate>
                                    <generateChecksums256>true</generateChecksums256>
                                    <generateChecksums512>true</generateChecksums512>
                                    <repositoryUrl>https://repo3.eclipse.org/repository/${nexus.staging.repository}/</repositoryUrl>
                                    <signArtifacts>true</signArtifacts>
                                    <syncAutoPublish>true</syncAutoPublish>
                                    <syncDropAfterPublish>true</syncDropAfterPublish>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <!-- 
          TODO - remove once parent is updated 
                 https://github.com/eclipse-ee4j/ee4j/pull/115/
        -->
        <profile>
            <id>staged</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <name>Nexus staging</name>
                    <id>repo3.eclipse.org</id>
                    <url>https://repo3.eclipse.org/repository/ee4j-staging/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>

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