<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.nosqlbench</groupId>
    <artifactId>datatools-mvn-defaults</artifactId>
    <version>0.1.25</version>
    <relativePath>../datatools-mvn-defaults</relativePath>
  </parent>
  <groupId>io.nosqlbench</groupId>
  <artifactId>datatools-vectordata</artifactId>
  <version>0.1.25</version>
  <name>${project.artifactId}</name>
  <description>Java implementation of the vectordata access module (reference: vectordata-rs)</description>
  <url>https://github.com/nosqlbench/nbdatatools</url>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Jonathan Shook</name>
      <email>jshook@gmail.com</email>
      <organization>nosqlbench.io</organization>
      <organizationUrl>https://nosqlbench.io/</organizationUrl>
    </developer>
    <developer>
      <name>Mark Wolters</name>
      <email>mwolters138@gmail.com</email>
      <organization>nosqlbench.io</organization>
      <organizationUrl>https://nosqlbench.io/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/nosqlbench/nbdatatools.git</connection>
    <developerConnection>scm:git:ssh://github.com:nosqlbench/nbdatatools.git</developerConnection>
    <url>https://github.com/nosqlbench/nbdatatools/tree/main</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>central</id>
      <url>https://central.sonatype.com/</url>
    </repository>
    <snapshotRepository>
      <id>central</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <javadoc.name>vectordata</javadoc.name>
    <bench.args></bench.args>
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.nosqlbench</groupId>
      <artifactId>datatools-testdata-apis</artifactId>
      <version>0.1.25</version>
    </dependency>
    <dependency>
      <groupId>io.nosqlbench</groupId>
      <artifactId>datatools-io-xvec</artifactId>
      <version>0.1.25</version>
    </dependency>
    <dependency>
      <groupId>io.nosqlbench</groupId>
      <artifactId>datatools-io-transport</artifactId>
      <version>0.1.25</version>
    </dependency>
    <dependency>
      <groupId>io.nosqlbench</groupId>
      <artifactId>datatools-io-slabtastic</artifactId>
      <version>0.1.25</version>
    </dependency>
    <dependency>
      <groupId>org.xerial</groupId>
      <artifactId>sqlite-jdbc</artifactId>
      <version>3.48.0.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.snakeyaml</groupId>
      <artifactId>snakeyaml-engine</artifactId>
      <version>2.9</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.12.0</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.10.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.10.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite</artifactId>
      <version>1.10.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.16.1</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.11.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents.core5</groupId>
      <artifactId>httpcore5</artifactId>
      <version>5.3.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents.core5</groupId>
      <artifactId>httpcore5-h2</artifactId>
      <version>5.3.4</version>
    </dependency>
    <dependency>
      <groupId>io.nosqlbench</groupId>
      <artifactId>datatools-jetty-test-server</artifactId>
      <version>0.1.25</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-core</artifactId>
      <version>1.13.2</version>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-prometheus</artifactId>
      <version>1.13.2</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>1.37</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-generator-annprocess</artifactId>
      <version>1.37</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>central-portal-snapshots</id>
      <name>Central Portal Snapshots</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </repository>
  </repositories>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>META-INF/services/**</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <excludes>
          <exclude>testserver/temp/**</exclude>
        </excludes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <release>11</release>
            </configuration>
          </execution>
          <execution>
            <id>java25-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>25</release>
              <multiReleaseOutput>true</multiReleaseOutput>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src/main/java25</compileSourceRoot>
              </compileSourceRoots>
              <compilerArgs>
                <arg>--add-modules</arg>
                <arg>jdk.incubator.vector</arg>
              </compilerArgs>
            </configuration>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <annotationProcessorPaths>
                <path>
                  <groupId>org.openjdk.jmh</groupId>
                  <artifactId>jmh-generator-annprocess</artifactId>
                  <version>1.37</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Multi-Release>true</Multi-Release>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/VectorDataTestSuite.java</include>
              </includes>
              <argLine>--add-modules jdk.incubator.vector --enable-native-access=ALL-UNNAMED</argLine>
              <systemPropertyVariables>
                <jetty.test.resources.root>${project.build.directory}/test-classes/testserver</jetty.test.resources.root>
              </systemPropertyVariables>
            </configuration>
          </execution>
          <execution>
            <id>performance-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/PerformanceTestSuite.java</include>
              </includes>
              <skip>${skipPerformanceTests}</skip>
              <failIfNoTests>false</failIfNoTests>
              <argLine>--add-modules jdk.incubator.vector --enable-native-access=ALL-UNNAMED</argLine>
              <systemPropertyVariables>
                <jetty.test.resources.root>${project.build.directory}/test-classes/testserver</jetty.test.resources.root>
              </systemPropertyVariables>
            </configuration>
          </execution>
          <execution>
            <id>accuracy-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/AccuracyTestSuite.java</include>
              </includes>
              <skip>${skipAccuracyTests}</skip>
              <argLine>--add-modules jdk.incubator.vector --enable-native-access=ALL-UNNAMED</argLine>
              <systemPropertyVariables>
                <jetty.test.resources.root>${project.build.directory}/test-classes/testserver</jetty.test.resources.root>
              </systemPropertyVariables>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>**/VectorDataTestSuite.java</include>
          </includes>
          <argLine>--add-modules jdk.incubator.vector --enable-native-access=ALL-UNNAMED</argLine>
          <systemPropertyVariables>
            <jetty.test.resources.root>${project.build.directory}/test-classes/testserver</jetty.test.resources.root>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.15</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>**/*.java</include>
          </includes>
          <excludes>
            <exclude>**/gen/**</exclude>
            <exclude>**/generated/**</exclude>
            <exclude>**/jmh_generated/**</exclude>
            <exclude>**/generated-sources/**</exclude>
          </excludes>
          <addLicenseHeaders>true</addLicenseHeaders>
          <copyrightMessage>Copyright (c) nosqlbench</copyrightMessage>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.3.0</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</version>
        <executions>
          <execution>
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>bench-vector-bulk</id>
            <phase>none</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>java</executable>
              <commandlineArgs>-classpath %classpath -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints io.nosqlbench.vectordata.benchmarks.VectorDataBulkAccessBenchmark ${bench.args}</commandlineArgs>
              <classpathScope>test</classpathScope>
              <skip>false</skip>
            </configuration>
          </execution>
          <execution>
            <id>bench-predicate-bulk</id>
            <phase>none</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>java</executable>
              <commandlineArgs>-classpath %classpath -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints io.nosqlbench.vectordata.benchmarks.PredicateDataBulkAccessBenchmark ${bench.args}</commandlineArgs>
              <classpathScope>test</classpathScope>
              <skip>false</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>native</id>
      <build />
    </profile>
    <profile>
      <id>bench-predicate-format</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>predicate_format_jmh</id>
                <phase>test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>java</executable>
                  <arguments>
                    <argument>-classpath</argument>
                    <classpath />
                    <argument>org.openjdk.jmh.Main</argument>
                    <argument>io.nosqlbench.vectordata.spec.predicates.PredicateFormatBenchmark</argument>
                    <argument>-f</argument>
                    <argument>1</argument>
                    <argument>-wi</argument>
                    <argument>2</argument>
                    <argument>-i</argument>
                    <argument>3</argument>
                    <argument>-t</argument>
                    <argument>1</argument>
                  </arguments>
                  <classpathScope>test</classpathScope>
                  <skip>false</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>bench-metadata-format</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>metadata_format_jmh</id>
                <phase>test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>java</executable>
                  <arguments>
                    <argument>-classpath</argument>
                    <classpath />
                    <argument>org.openjdk.jmh.Main</argument>
                    <argument>io.nosqlbench.vectordata.spec.metadata.MetadataFormatBenchmark</argument>
                    <argument>-f</argument>
                    <argument>1</argument>
                    <argument>-wi</argument>
                    <argument>2</argument>
                    <argument>-i</argument>
                    <argument>3</argument>
                    <argument>-t</argument>
                    <argument>1</argument>
                  </arguments>
                  <classpathScope>test</classpathScope>
                  <skip>false</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
