<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2013-2025 chronicle.software; 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>net.openhft</groupId>
        <artifactId>root-parent-pom</artifactId>
        <version>2026.0</version>
        <relativePath />
    </parent>

    <artifactId>java-parent-pom</artifactId>
    <version>2026.0</version>
    <packaging>pom</packaging>

    <name>OpenHFT/Java Parent POM</name>
    <description>This parent pom is used by all the OpenHft java projects</description>

    <organization>
        <name>Chronicle Software Ltd</name>
        <url>https://chronicle.software/</url>
    </organization>

    <properties>
        <sonar.organization>openhft</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <!-- Define the target coverage thresholds as properties -->
        <jacoco.line.coverage>0.8</jacoco.line.coverage>
        <jacoco.branch.coverage>0.7</jacoco.branch.coverage>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <license.year>2013-2025</license.year>
        <license.owner>chronicle.software</license.owner>
        <license.spdx>Apache-2.0</license.spdx>
        <license.skip>false</license.skip>
        <surefireArgLine />
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.6</version>
                <configuration>
                    <skip>${license.skip}</skip>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <strictCheck>true</strictCheck>
                    <defaultProperties>
                        <year>${license.year}</year>
                        <owner>${license.owner}</owner>
                        <spdx>${license.spdx}</spdx>
                    </defaultProperties>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                        <sh>SCRIPT_STYLE</sh>
                    </mapping>
                    <licenseSets>
                        <licenseSet>
                            <inlineHeader><![CDATA[Copyright ${license.year} ${license.owner}; SPDX-License-Identifier: ${license.spdx}]]></inlineHeader>
                            <includes>
                                <include>**/*.java</include>
                                <include>**/*.sh</include>
                            </includes>
                            <excludes>
                                <exclude>**/target/**</exclude>
                                <exclude>**/generated-sources/**</exclude>
                                <exclude>**/build/generated/**</exclude>
                                <exclude>**/src/test/resources/**</exclude>
                                <exclude>**/src/main/resources/**</exclude>
                            </excludes>
                            <useDefaultExcludes>true</useDefaultExcludes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <project.build.directory>${project.build.directory}</project.build.directory>
                    </systemPropertyVariables>
                    <enableAssertions>true</enableAssertions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <configuration>
                    <checkoutDirectory>${project.build.directory}/scmpublish/javadoc</checkoutDirectory>
                    <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
                    <content>${project.reporting.outputDirectory}</content>
                    <skipDeletedFiles>true</skipDeletedFiles>
                    <pubScmUrl>scm:git:git@github.com:OpenHFT/${project.artifactId}
                    </pubScmUrl>
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
            </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-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint:all,-options,-processing</arg>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                    <failOnWarning>true</failOnWarning>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                    <proc>none</proc>
                </configuration>
            </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>
                <configuration>
                    <source>8</source>
                    <additionalOptions>${javadoc.opts}</additionalOptions>
                    <failOnError>true</failOnError>
                    <failOnWarnings>true</failOnWarnings>
                    <excludePackageNames>*.internal:*.internal.*;*.impl;*.impl.*</excludePackageNames>
                    <doclint>all,-missing</doclint>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <scm>
        <connection>scm:git:git@github.com:OpenHFT/OpenHFT.git</connection>
        <developerConnection>scm:git:git@github.com:OpenHFT/OpenHFT.git</developerConnection>
        <url>scm:git:git@github.com:OpenHFT/OpenHFT.git</url>
        <tag>java-parent-pom-2026.0</tag>
    </scm>
</project>
