<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2020 Goldman Sachs

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<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>org.finos.legend.pure</groupId>
    <artifactId>legend-pure-runtime</artifactId>
    <version>5.103.0</version>
  </parent>
  <artifactId>legend-pure-runtime-java-engine-compiled</artifactId>
  <version>5.103.0</version>
  <name>Legend Pure - Runtime - Engine Compiled</name>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m4</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m3-bootstrap-generator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m3-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-runtime-java-engine-shared</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vavr</groupId>
      <artifactId>vavr</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>io.github.classgraph</groupId>
      <artifactId>classgraph</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-util</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-noop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.test-framework</groupId>
      <artifactId>jersey-test-framework-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.test-framework.providers</groupId>
      <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections-testutils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.finos.legend.pure</groupId>
      <artifactId>legend-pure-m3-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>pre-compile</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>default-compile</id>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>GenerateFactoryClasses</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>org.finos.legend.pure.runtime.java.compiled.generation.orchestrator.JavaModelFactoryGenerator</mainClass>
              <arguments>
                <argument>Core</argument>
                <argument>org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3AntlrParser</argument>
                <argument>${project.build.directory}/generated-sources/</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
            </configuration>
          </execution>
          <execution>
            <id>GenerateTestJavaCode</id>
            <phase>compile</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>org.finos.legend.pure.runtime.java.compiled.generation.orchestrator.JavaCodeGeneration</mainClass>
              <arguments>
                <argument>platform</argument>
                <argument>${project.build.directory}/generated-test-resources</argument>
                <argument>${project.build.directory}</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
            </configuration>
          </execution>
          <execution>
            <id>GeneratePCTReport</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>org.finos.legend.pure.runtime.java.compiled.testHelper.PCTReportGenerator</mainClass>
              <arguments>
                <argument>${project.build.directory}/classes/pct-reports/</argument>
                <argument>org.finos.legend.pure.runtime.java.compiled.pct.functions.Test_Compiled_GrammarFunctions_PCT</argument>
                <argument>org.finos.legend.pure.runtime.java.compiled.pct.functions.Test_Compiled_EssentialFunctions_PCT</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
              <classpathScope>test</classpathScope>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
