<?xml version="1.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>
  <groupId>de.caluga</groupId>
  <artifactId>morphium-parent</artifactId>
  <version>6.2.0</version>
  <packaging>pom</packaging>
  <name>Morphium Parent</name>
  <url>http://caluga.de</url>
  <description>
        Morphium - a Caching Object Mapper for MongoDB (Parent POM)
    </description>
  <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>
  <scm>
    <url>https://github.com/sboesebeck/morphium</url>
    <connection>scm:git:git://github.com/sboesebeck/morphium.git</connection>
    <developerConnection>scm:git:git@github.com:sboesebeck/morphium.git</developerConnection>
    <tag>v6.2.0</tag>
  </scm>
  <developers>
    <developer>
      <id>sBoesebeck</id>
      <name>Stephan Bösebeck</name>
      <email>sb@caluga.de</email>
    </developer>
  </developers>
  <modules>
    <module>morphium-core</module>
    <module>poppydb</module>
  </modules>
  <properties>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <maven.compiler.release>21</maven.compiler.release>
    <maven.compiler.skip>false</maven.compiler.skip>
    <java.version>21</java.version>
    <jacoco.percentage.instruction>0.40</jacoco.percentage.instruction>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <mongodbDriver.version>4.11.5</mongodbDriver.version>
    <netty.version>4.2.9.Final</netty.version>
    <!--  This is required for later correct replacement of argline -->
    <argLine />
    <!-- JUnit tag control (defaults) -->
    <test.includeTags />
    <test.excludeTags>external</test.excludeTags>
  </properties>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
            <argLine>${argLine} --add-opens java.base/java.lang=ALL-UNNAMED</argLine>
            <!-- JUnit 5 tag selection - use groups/excludedGroups for surefire -->
            <groups>${test.includeTags}</groups>
            <excludedGroups>${test.excludeTags}</excludedGroups>
            <properties>
              <configurationParameters>
                junit.jupiter.extensions.autodetection.enabled=true
              </configurationParameters>
            </properties>
            <systemPropertyVariables>
              <morphium.tests.verbose>${morphium.tests.verbose}</morphium.tests.verbose>
            </systemPropertyVariables>
            <forkCount>1</forkCount>
            <reuseForks>false</reuseForks>
            <runOrder>filesystem</runOrder>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.1.0</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.4.1</version>
          <configuration>
            <failOnError>false</failOnError>
            <javadocExecutable>/usr/bin/javadoc</javadocExecutable>
            <additionalJOption>-J-Xmx2048m</additionalJOption>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.12.1</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <release>${maven.compiler.release}</release>
            <compilerArgs>
              <arg>-Xlint:deprecation,unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.2</version>
          <configuration>
            <excludes>
              <exclude>log4j*.xml</exclude>
              <exclude>logging*.properties</exclude>
              <exclude>logback*.xml</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <releaseProfiles>release-sign-artifacts</releaseProfiles>
            <preparationGoals>clean install -DskipTests</preparationGoals>
            <arguments>-Dmaven.javadoc.skip=false -DskipTests</arguments>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.xerial.snappy</groupId>
        <artifactId>snappy-java</artifactId>
        <version>1.1.10.8</version>
        <type>jar</type>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jol</groupId>
        <artifactId>jol-core</artifactId>
        <version>0.17</version>
      </dependency>
      <dependency>
        <groupId>org.graalvm.js</groupId>
        <artifactId>js-scriptengine</artifactId>
        <version>25.0.1</version>
      </dependency>
      <dependency>
        <groupId>org.graalvm.polyglot</groupId>
        <artifactId>polyglot</artifactId>
        <version>25.0.1</version>
      </dependency>
      <dependency>
        <groupId>org.graalvm.polyglot</groupId>
        <artifactId>js</artifactId>
        <version>25.0.1</version>
        <type>pom</type>
        <exclusions>
          <exclusion>
            <groupId>org.graalvm.truffle</groupId>
            <artifactId>truffle-enterprise</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>5.9.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>javax.jms</groupId>
        <artifactId>javax.jms-api</artifactId>
        <version>2.0.1</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.17</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.5.25</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.5.25</version>
      </dependency>
      <dependency>
        <groupId>com.colofabrix.scala</groupId>
        <artifactId>figlet4s-java</artifactId>
        <version>0.3.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>5.3.39</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>bson</artifactId>
        <version>${mongodbDriver.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongodb-driver-sync</artifactId>
        <version>${mongodbDriver.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongodb-driver-core</artifactId>
        <version>${mongodbDriver.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.ongres.scram</groupId>
        <artifactId>client</artifactId>
        <version>2.1</version>
      </dependency>
      <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1.1</version>
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.1.Final</version>
      </dependency>
      <dependency>
        <groupId>org.ehcache</groupId>
        <artifactId>jcache</artifactId>
        <version>1.0.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hibernate.validator</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>8.0.0.Final</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>javax.cache</groupId>
        <artifactId>cache-api</artifactId>
        <version>1.1.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.20.0</version>
      </dependency>
      <dependency>
        <groupId>io.github.classgraph</groupId>
        <artifactId>classgraph</artifactId>
        <version>4.8.184</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.27.7</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>de.caluga</groupId>
        <artifactId>rsa</artifactId>
        <version>1.1</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <profiles>
    <profile>
      <id>release-nosign-artifacts</id>
    </profile>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>

        </plugins>
      </build>
    </profile>
    <!-- Test execution control profiles -->
    <profile>
      <id>external</id>
      <properties>
        <test.excludeTags />
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <morphium.tests.external>true</morphium.tests.external>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>inmem</id>
      <properties>
        <morphium.driver>inmem</morphium.driver>
      </properties>
    </profile>
    <profile>
      <id>pooled</id>
      <properties>
        <morphium.driver>pooled</morphium.driver>
      </properties>
    </profile>
    <profile>
      <id>single</id>
      <properties>
        <morphium.driver>single</morphium.driver>
      </properties>
    </profile>
  </profiles>
</project>
