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

  <groupId>org.opencds.cqf.cql</groupId>
  <artifactId>evaluator</artifactId>
  <version>3.0.0-PRE5</version>
  <packaging>jar</packaging>

  <name>evaluator</name>
  <url>https://github.com/cqframework/clinical-reasoning/tree/master</url>

  <description>CQL Evaluator</description>

  <parent>
    <groupId>org.opencds.cqf.cql</groupId>
    <artifactId>evaluator.shared</artifactId>
    <version>3.0.0-PRE5</version>
  </parent>

  <dependencies>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>engine</artifactId>
    </dependency>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>cql-to-elm</artifactId>
    </dependency>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>elm</artifactId>
    </dependency>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>model</artifactId>
    </dependency>
    <!-- Required for MapStruct Annotations -->
    <dependency>
      <groupId>org.mapstruct</groupId>
      <artifactId>mapstruct</artifactId>
    </dependency>

    <!-- FHIR, Quick and QDM are not required to compile -->
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>engine-fhir</artifactId>
      <version>${cql.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>quick</artifactId>
      <version>${cql.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>info.cqframework</groupId>
      <artifactId>elm-fhir</artifactId>
      <version>${cql.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opencds.cqf.cql</groupId>
      <artifactId>evaluator.jackson-deps</artifactId>
      <version>3.0.0-PRE5</version>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opencds.cqf.fhir</groupId>
      <artifactId>cqf-fhir-api</artifactId>
      <version>3.0.0-PRE5</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- uses the apt plugin instead of the compiler plugin for annotation processing.
            This seems to be more reliable for IDE builds -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <release>11</release>
          <source>11</source>
          <target>11</target>
          <failOnError>true</failOnError>
          <failOnWarning>true</failOnWarning>
          <showWarnings>true</showWarnings>
          <compilerArgs>
            <arg>-Xlint:all,-processing</arg>
            <arg>-Werror</arg>
            <arg>-implicit:none</arg>
            <arg>-proc:none</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mysema.maven</groupId>
        <artifactId>apt-maven-plugin</artifactId>
        <version>1.1.3</version>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <outputDirectory>target/generated-sources</outputDirectory>
              <processors>
                <processor>org.mapstruct.ap.MappingProcessor</processor>
              </processors>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>${org.mapstruct.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>