<?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>

  <parent>
    <groupId>org.daisy.pipeline.modules</groupId>
    <artifactId>modules-parent</artifactId>
    <version>1.15.4</version>
    <relativePath>../../parent</relativePath>
  </parent>

  <version>1.0.0</version>
  <artifactId>ocr-utils</artifactId>
  <packaging>bundle</packaging>

  <name>DAISY Pipeline 2 module :: OCR Utils</name>
  <description>API for OCR conversions</description>

  <dependencies>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>common-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>framework-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline</groupId>
      <artifactId>xproc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>common-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>fileset-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.daisy.pipeline.modules</groupId>
      <artifactId>pandoc-adapter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>xmpbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <properties>
    <expose-services>
      org.daisy.pipeline.ocr.impl.PDFToWordScriptProvider,
      org.daisy.pipeline.ocr.mistral.impl.MistralOCRService
    </expose-services>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>maven.properties</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>maven.properties</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <org.daisy.pipeline.ocr.mistral.apikey>mykey</org.daisy.pipeline.ocr.mistral.apikey>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <!-- FIXME: disabled htmlize-sources for now because there are XProc files but no catalog.xml -->
      <plugin>
        <groupId>org.daisy.pipeline.build</groupId>
        <artifactId>modules-build-helper</artifactId>
        <executions>
          <execution>
            <id>htmlize-sources</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>module-with-documentation</id>
      <activation>
        <property>
          <name>documentation</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
