<?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">
  <groupId>ai.kognition.pilecv4j</groupId>
  <version>1.0</version>
  <packaging>pom</packaging>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>pilecv4j-settings</artifactId>
  <name>PileCv4j Settings</name>
  <description>An image and video processing library for java.</description>

  <properties>
    <pilecv4j.distribution.repo.id>ossrh</pilecv4j.distribution.repo.id>
    <pilecv4j.distribution.repo.url>https://s01.oss.sonatype.org/content/repositories/snapshots/</pilecv4j.distribution.repo.url>

    <build.type>release</build.type>
    <cmake.build.type>Debug</cmake.build.type>

    <!-- This property is used in the native build to make sure the version of
         OpenCV we're building against matches what we expect. -->
    <opencv-build.version>4.5.2</opencv-build.version>
    <opencv-short.version>452</opencv-short.version>
    <!-- <cuda.version>11.2</cuda.version> -->

    <!-- Normally the opencv-base version is the same as the opencv-build version   -->
    <!--  however, the build version needs to be unadulterated by version suffixes -->
    <!--  so opencv-base.version of 4.0.0-rc implies a opencv-build version of 4.0.0  -->
    <opencv-base.version>${opencv-build.version}</opencv-base.version>
    <!-- <opencv-base.version>${opencv-build.version}-rc</opencv-base.version> -->

    <!-- The artifact version -->
    <opencv.version>1.0-opencv${opencv-base.version}${opencv-gpu.version-extention}</opencv.version>

    <!-- generator and platform.options are set in the profile -->
    <cmake.generator>${generator}</cmake.generator>
    <cmake.options>${platform.option}</cmake.options>
  </properties>

  <url>git@github.com:KognitionAI/pilecv4j</url>
  <developers>
    <developer>
      <id>jimfcarroll</id>
      <name>Jim Carroll</name>
      <url>https://github.com/jimfcarroll</url>
      <organization>Very Little</organization>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>
  </developers>
  
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:KognitionAI/pilecv4j.git</connection>
    <developerConnection>scm:git:git@github.com:KognitionAI/pilecv4j.git</developerConnection>
    <url>git@github.com:KognitionAI/pilecv4j.git</url>
  </scm>

  <repositories>
    <repository>
      <id>maven-eclipse-repo</id>
      <url>https://maven-eclipse.github.io/maven</url>
    </repository>
  </repositories>
  
  <distributionManagement>
    <repository>
      <id>${pilecv4j.distribution.release.repo.id}</id>
      <name>Pilecv4j release</name>
      <url>${pilecv4j.distribution.release.repo.url}</url>
    </repository>
    <snapshotRepository>
      <id>${pilecv4j.distribution.snapshot.repo.id}</id>
      <name>Pilecv4j snapshot</name>
      <url>${pilecv4j.distribution.snapshot.repo.url}</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>native-image-${platform}</artifactId>
        <classifier>bin</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>native-python-${platform}</artifactId>
        <classifier>bin</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>native-ffmpeg-${platform}</artifactId>
        <classifier>bin</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>native-nr-${platform}</artifactId>
        <classifier>bin</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>native-ipc-${ipc-impl}-${platform}</artifactId>
        <classifier>bin</classifier>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.35.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.13</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>com.googlecode.cmake-maven-project</groupId>
          <artifactId>cmake-maven-plugin</artifactId>
          <version>3.22.1-b1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>17</source>
          <target>17</target>
          <debug>true</debug>
        </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>
    </plugins>
  </build>

  <profiles>
    <!-- ==================================== -->
    <!--       Settings based on the OS       -->
    <!-- ==================================== -->
    <profile>
      <id>linux-aarch64</id>
      <activation>
        <os>
          <family>linux</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <properties>
        <swtartifact>org.eclipse.swt.gtk.linux.aarch64</swtartifact>
        <platform>linux-aarch64</platform>
        <generator>Unix Makefiles</generator>
        <opencv-gpu.version-extention></opencv-gpu.version-extention>
        <platform.option></platform.option>
      </properties>
      <!-- block Streaming tests on this platform -->
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <redirectTestOutputToFile>false</redirectTestOutputToFile>
                <excludes>
                  <exclude>**/*Streaming.java</exclude>
                </excludes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>linux-x86</id>
      <activation>
        <os>
          <family>linux</family>
          <arch>i386</arch>
        </os>
      </activation>
      <properties>
        <swtartifact>org.eclipse.swt.gtk.linux.x86</swtartifact>
        <platform>linux-x86</platform>
        <generator>Unix Makefiles</generator>
        <opencv-gpu.version-extention></opencv-gpu.version-extention>
        <platform.option></platform.option>
      </properties>
      <!-- block Streaming tests on this platform -->
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <redirectTestOutputToFile>false</redirectTestOutputToFile>
                <excludes>
                  <exclude>**/*Streaming.java</exclude>
                </excludes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>linux-64bit</id>
      <activation>
        <os>
          <family>linux</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <swtartifact>org.eclipse.swt.gtk.linux.x86_64</swtartifact>
        <platform>linux-x86_64</platform>
        <generator>Unix Makefiles</generator>
        <!-- <opencv-gpu.version-extention>-cuda${cuda.version}</opencv-gpu.version-extention> -->
        <opencv-gpu.version-extention></opencv-gpu.version-extention>
        <platform.option></platform.option>
        <ipc-impl>posix</ipc-impl>
      </properties>
    </profile>
    <profile>
      <id>windows-x86_64</id>
      <activation>
        <os>
          <family>windows</family>
          <arch>amd64</arch>
        </os>
      </activation>
      <properties>
        <swtartifact>org.eclipse.swt.win32.win32.x86_64</swtartifact>
        <platform>windows-x86_64</platform>
        <platform.option>-Ax64</platform.option>
        <opencv-gpu.version-extention></opencv-gpu.version-extention>
        <generator>YOU MUST SPECIFY THE GENERATOR ON THE COMMAND LINE!!!! use: -Dgenerator="generator"</generator>
        <ipc-impl>windows</ipc-impl>
      </properties>
      <!-- block Streaming tests on this platform -->
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <redirectTestOutputToFile>false</redirectTestOutputToFile>
                <excludes>
                  <exclude>**/*Streaming.java</exclude>
                </excludes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>windows-x86</id>
      <activation>
        <os>
          <family>windows</family>
          <arch>x86</arch>
        </os>
      </activation>
      <properties>
        <swtartifact>org.eclipse.swt.win32.win32.x86</swtartifact>
        <platform>windows-x86</platform>
        <generator>YOU MUST SPECIFY THE GENERATOR ON THE COMMAND LINE!!!! use: -Dgenerator="generator"</generator>
        <opencv-gpu.version-extention></opencv-gpu.version-extention>
        <platform.option></platform.option>
        <ipc-impl>windows</ipc-impl>
      </properties>
      <!-- block Streaming tests on this platform -->
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <redirectTestOutputToFile>false</redirectTestOutputToFile>
                <excludes>
                  <exclude>**/*Streaming.java</exclude>
                </excludes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <!-- ============================================ -->
    <!-- If we're building to deploy to maven central -->
    <!-- ============================================ -->
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <doclint>none</doclint>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- ============================================ -->
  </profiles>

</project>
