<?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">
  <parent>
    <artifactId>blaze-persistence-core</artifactId>
    <groupId>com.blazebit</groupId>
    <version>1.6.8</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>blaze-persistence-core-parser</artifactId>
  <name>Blazebit Persistence Core Parser</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <relocations>
                <relocation>
                  <pattern>org.antlr.v4.runtime</pattern>
                  <shadedPattern>com.blazebit.persistence.parser.antlr</shadedPattern>
                </relocation>
              </relocations>
              <artifactSet>
                <includes>
                  <include>org.antlr:antlr4-runtime</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <version>4.7.2</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>antlr4</goal>
            </goals>
            <configuration>
              <outputDirectory>target/generated/antlr</outputDirectory>
              <visitor>true</visitor>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-antlr4-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>target/generated/antlr</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-module-infos</id>
            <phase>package</phase>
            <goals>
              <goal>add-module-info</goal>
            </goals>
            <configuration>
              <module>
                <moduleInfoSource>module ${module.name} {
                                        requires java.sql;
                                        requires java.persistence;
                                        requires com.blazebit.common.utils;
                                        exports com.blazebit.persistence.parser;
                                        exports com.blazebit.persistence.parser.expression;
                                        exports com.blazebit.persistence.parser.expression.modifier;
                                        exports com.blazebit.persistence.parser.predicate;
                                        exports com.blazebit.persistence.parser.util;
                                        uses com.blazebit.persistence.parser.util.TypeConverterContributor;
                                    }</moduleInfoSource>
              </module>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.openejb</groupId>
      <artifactId>javaee-api</artifactId>
      <version>6.0-6</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.blazebit</groupId>
      <artifactId>blaze-common-utils</artifactId>
      <version>0.1.21</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.carrotsearch</groupId>
      <artifactId>junit-benchmarks</artifactId>
      <version>0.7.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <module.name>com.blazebit.persistence.core.parser</module.name>
  </properties>
</project>
