<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>org.neo4j.bolt</groupId>
    <artifactId>neo4j-bolt-connection-parent</artifactId>
    <version>6.0.2</version>

    <packaging>pom</packaging>
    <name>Neo4j Bolt Connection</name>
    <description>A project for building Neo4j Bolt Connection based on Bolt protocol.</description>
    <url>https://github.com/neo4j/bolt-connection-java</url>

    <licenses>
        <license>
            <name>Apache License, Version 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>neo4j</id>
            <name>The Neo4j Team</name>
            <url>http://www.neo4j.com/</url>
            <organization>Neo4j Sweden AB</organization>
            <organizationUrl>http://www.neo4j.com/</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>neo4j-bolt-connection-bom</module>
        <module>neo4j-bolt-connection</module>
        <module>neo4j-bolt-connection-test-values</module>
        <module>neo4j-bolt-connection-netty</module>
        <module>neo4j-bolt-connection-pooled</module>
        <module>neo4j-bolt-connection-routed</module>
        <module>neo4j-bolt-connection-query-api</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/neo4j/bolt-connection-java.git</connection>
        <developerConnection>scm:git:git@github.com:neo4j/bolt-connection-java.git</developerConnection>
        <url>https://github.com/neo4j/bolt-connection-java</url>
    </scm>

    <properties>
        <bouncycastle-jdk18on.version>1.81</bouncycastle-jdk18on.version>
        <build-resources.version>2024-12.1</build-resources.version>
        <junit.version>5.13.2</junit.version>
        <maven.build.timestamp.format>'v'yyyyMMdd-HHmm</maven.build.timestamp.format>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.xlint.extras />
        <!-- Skip deployment by default for everything in this project. -->
        <maven.deploy.skip>true</maven.deploy.skip>
        <mockito.version>5.18.0</mockito.version>
        <!-- To be overwritten by child projects -->
        <moduleName />
        <netty-bom.version>4.2.2.Final</netty-bom.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <rootDir>${project.basedir}</rootDir>
        <sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
        <surefire.and.failsafe.version>3.5.3</surefire.and.failsafe.version>
        <surefire.jpms.args />
        <testcontainers.version>1.21.3</testcontainers.version>
    </properties>

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

            <!-- Test dependencies -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-bom</artifactId>
                <version>${mockito.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk18on</artifactId>
                <version>${bouncycastle-jdk18on.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bouncycastle-jdk18on.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <version>1.7.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <compilerArgs>
                            <arg>-Werror</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.and.failsafe.version}</version>
                    <configuration>
                        <argLine>${surefire.jpms.args}</argLine>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.and.failsafe.version}</version>
                    <configuration>
                        <useModulePath>false</useModulePath>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                            <configuration>
                                <archive>
                                    <manifestEntries>
                                        <Bundle-Name>${project.name} (Source)</Bundle-Name>
                                        <Bundle-SymbolicName>${bundle.name}.source</Bundle-SymbolicName>
                                        <Bundle-Version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${build.timestamp}</Bundle-Version>
                                        <Eclipse-SourceBundle>${bundle.name};version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${build.timestamp}";roots:="."</Eclipse-SourceBundle>
                                    </manifestEntries>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>2.44.3</version>
                    <configuration>
                        <java>
                            <palantirJavaFormat />
                            <toggleOffOn />
                        </java>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <rules>
                            <RestrictImports>
                                <reason>Star imports are not allowed, please configure your editor to substitute them with fully qualified imports.</reason>
                                <bannedImport>**.'*'</bannedImport>
                            </RestrictImports>
                        </rules>
                        <fail>true</fail>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>de.skuzzle.enforcer</groupId>
                            <artifactId>restrict-imports-enforcer-rule</artifactId>
                            <version>2.0.0</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <strictCheck>true</strictCheck>
                        <header>license/neo4j_apache_v2/header.txt</header>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.neo4j.build</groupId>
                            <artifactId>resources</artifactId>
                            <version>${build-resources.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <!-- always check license headers -->
                            <id>check-licenses</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>initialize</phase>
                        </execution>
                        <!-- also available: `mvn license:[cmd]` where cmd could be one of `check`, `format`, or `delete`-->
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.neo4j.build.plugins</groupId>
                    <artifactId>licensing-maven-plugin</artifactId>
                    <version>1.7.11</version>
                    <configuration>
                        <failIfDisliked>true</failIfDisliked>
                        <failIfMissing>true</failIfMissing>
                        <plainTextReport>true</plainTextReport>
                        <prependText>license/neo4j_apache_v2/notice.txt</prependText>
                        <excludedGroups>^((org.neo4j.driver){1})$</excludedGroups>
                        <includedScopes>compile</includedScopes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.neo4j.build</groupId>
                            <artifactId>resources</artifactId>
                            <version>${build-resources.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>list-all-licenses</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>compile</phase>
                            <configuration>
                                <licensingRequirementFiles>
                                    <licensingRequirementFile>licensing/licensing-requirements-base.xml</licensingRequirementFile>
                                </licensingRequirementFiles>
                                <thirdPartyLicensingFilename>${project.artifactId}-${project.version}-NOTICE.txt</thirdPartyLicensingFilename>
                                <checkExistingNoticeFile>${project.build.directory}/../NOTICE.txt</checkExistingNoticeFile>
                                <listPrependText>licensing/list-prefix.txt</listPrependText>
                                <listReport>${project.artifactId}-${project.version}-LICENSES.txt</listReport>
                                <checkExistingLicensesFile>${project.build.directory}/../LICENSES.txt</checkExistingLicensesFile>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                    <configuration>
                        <charset>UTF-8</charset>
                        <docencoding>UTF-8</docencoding>
                        <encoding>UTF-8</encoding>
                        <top><![CDATA[
            <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
            <script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
            <script>hljs.initHighlightingOnLoad();</script>
          ]]></top>
                        <bottom><![CDATA[
                    <script>
                    if (typeof useModuleDirectories !== 'undefined') {
                      useModuleDirectories = false;
                    }
                    </script>
                ]]></bottom>
                        <additionalOptions>
                            <!-- Required for Java 8u121 or later. See https://github.com/neo4j/neo4j-java-driver/pull/318  -->
                            <option>--allow-script-in-comments</option>
                            <option>-Xdoclint/package:-org.neo4j.driver.internal,-org.neo4j.driver.internal.*</option>
                        </additionalOptions>
                        <sourceFileIncludes>
                            <sourceFileInclude>org/neo4j/bolt/**/*.java</sourceFileInclude>
                        </sourceFileIncludes>
                        <overview>${rootDir}/build/javadoc/overview.html</overview>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <failOnWarnings>false</failOnWarnings>
                            </configuration>
                        </execution>
                        <execution>
                            <id>aggregate</id>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                            <phase>site</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>${sortpom-maven-plugin.version}</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <keepBlankLines>true</keepBlankLines>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <sortProperties>true</sortProperties>
                        <sortDependencies>scope,groupId,artifactId</sortDependencies>
                        <createBackupFile>false</createBackupFile>
                        <expandEmptyElements>false</expandEmptyElements>
                        <verifyFail>stop</verifyFail>
                        <verifyFailOn>strict</verifyFailOn>
                        <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.neo4j.build.plugins</groupId>
                <artifactId>licensing-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <!-- Explicit deployment override for this artifact only. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
