<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.cojen</groupId>
  <artifactId>tupl</artifactId>
  <packaging>jar</packaging>
  <name>Tupl</name>
 <version>1.7.0</version>
  <description>
    The Unnamed Persistence Library.
  </description>

  <url>https://github.com/cojen/Tupl</url>

  <inceptionYear>2011</inceptionYear>

  <organization>
    <name>Cojen</name>
    <url>https://github.com/cojen</url>
  </organization>

  <licenses>
    <license>
      <name>AGPL-3.0</name>
      <url>https://www.gnu.org/licenses/agpl-3.0.en.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Brian O'Neill</name>
      <email>bronee@gmail.com</email>
      <organization>Cojen</organization>
      <organizationUrl>https://cojen.org</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/cojen/Tupl.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:cojen/Tupl.git</developerConnection>
    <url>https://github.com/cojen/Tupl</url>
  </scm>

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

  <issueManagement>
    <url>https://github.com/cojen/Tupl/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <properties>
    <!-- encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.cojen</groupId>
      <artifactId>cojen-maker</artifactId>
      <version>[2.4,)</version>
    </dependency>
    <dependency>
      <groupId>org.cojen</groupId>
      <artifactId>cojen-dirmi</artifactId>
      <version>[2.3,)</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna-platform</artifactId>
      <version>[5.0,)</version>
    </dependency>
    <dependency>
      <groupId>org.lz4</groupId>
      <artifactId>lz4-java</artifactId>
      <version>[1.7,)</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>[1.7,2.0)</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>[4.13,)</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
      <version>1.0-1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <plugins>

      <!--
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.8</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.60</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/RedoEventPrinter.class</exclude>
          </excludes>
        </configuration>
      </plugin>
      -->

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.6.0</version>
        <executions>
          <execution>
            <id>page-access-transformer</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-cp</argument>
            <argument>;</argument>
            <argument>src/main/java/org/cojen/tupl/tools/PageAccessTransformer.java</argument>
            <argument>src/main/java/org/cojen/tupl/core</argument>
            <argument>src/main/java/org/cojen/tupl/core</argument>
            <argument>clean</argument>
          </arguments>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
          <configuration>
            <source>17</source>
            <target>17</target>
          </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.2</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>org.cojen.tupl</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.4.1</version>
        <configuration>
          <detectJavaApiLink>true</detectJavaApiLink>
          <links>
            <link>https://docs.oracle.com/en/java/javase/19/docs/api</link>
          </links>
          <author>false</author>
          <nodeprecatedlist>true</nodeprecatedlist>
          <notimestamp>true</notimestamp>
          <splitindex>true</splitindex>
          <reportOutputDirectory>${basedir}/docs</reportOutputDirectory>
          <destDir>javadoc</destDir>
          <excludePackageNames>org.cojen.tupl.core:org.cojen.tupl.ev:org.cojen.tupl.jmx:org.cojen.tupl.views:org.cojen.tupl.filter:org.cojen.tupl.rows:org.cojen.tupl.remote</excludePackageNames>
           <additionalOptions>-Xdoclint:none</additionalOptions> 
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>deploy</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
        <configuration>
          <!-- Why in the world does Surefire trim traces by default? -->
          <trimStackTrace>false</trimStackTrace>
          <useFile>false</useFile>
          <runOrder>random</runOrder>
          <parallel>classes</parallel>
          <perCoreThreadCount>false</perCoreThreadCount>
          <threadCount>6</threadCount>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>deploy</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>deploy</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.13</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
        </configuration>
      </plugin>

    </plugins>
  </build>
</project>
