<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2022 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 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">
    <parent>
        <groupId>org.finos.legend.engine</groupId>
        <artifactId>legend-engine-xt-relationalStore-postgresSql</artifactId>
        <version>4.99.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>legend-engine-xt-relationalStore-postgresSql-compiler</artifactId>
    <packaging>jar</packaging>
    <name>Legend Engine - XT - Relational Store - Postgres SQL - Compiler</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <configuration>
                    <addResourcesToClasspath>true</addResourcesToClasspath>
                </configuration>
                <executions>
                    <execution>
                        <id>Generate translator for metamodel</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <includePluginDependencies>true</includePluginDependencies>
                            <mainClass>org.finos.legend.engine.protocol.generation.GenerateProtocolToMetamodelTranslator</mainClass>
                            <arguments>
                                <argument>core_external_query_sql_metamodel.protocol.json</argument>
                                <argument>${project.build.directory}/generated-sources/</argument>
                            </arguments>
                            <classpathScope>test</classpathScope>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Generate translator for protocol</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <includePluginDependencies>true</includePluginDependencies>
                            <mainClass>org.finos.legend.engine.protocol.generation.GenerateMetamodelToProtocolTranslator</mainClass>
                            <arguments>
                                <argument>core_external_query_sql_schema_metamodel.protocol.json</argument>
                                <argument>${project.build.directory}/generated-sources/</argument>
                            </arguments>
                            <classpathScope>test</classpathScope>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.finos.legend.engine</groupId>
                        <artifactId>legend-engine-protocol-generation</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.finos.legend.engine</groupId>
                        <artifactId>legend-engine-pure-platform-dsl-diagram-java</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.basedir}/target/generated-sources/</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-dependency-plugin</artifactId>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <id>dependency-analyze</id>-->
<!--                        <configuration>-->
<!--                            &lt;!&ndash; The dependency plugin analyzer raises these as false positives &ndash;&gt;-->
<!--&lt;!&ndash;                            <ignoredUsedUndeclaredDependencies>&ndash;&gt;-->
<!--&lt;!&ndash;                                <dependency>org.finos.legend.pure:legend-pure-runtime-java-extension-compiled-dsl-mapping</dependency>&ndash;&gt;-->
<!--&lt;!&ndash;                                <dependency>org.finos.legend.engine:legend-engine-pure-platform-java</dependency>&ndash;&gt;-->
<!--&lt;!&ndash;                            </ignoredUsedUndeclaredDependencies>&ndash;&gt;-->
<!--                        </configuration>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
        </plugins>
    </build>

    <dependencies>
        <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-compiled</artifactId>-->
<!--        </dependency>-->

<!--        <dependency>-->
<!--            <groupId>org.finos.legend.engine</groupId>-->
<!--            <artifactId>legend-engine-xt-sql-expression-grammar</artifactId>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>org.finos.legend.engine</groupId>-->
<!--            <artifactId>legend-engine-xt-sql-expression-pure</artifactId>-->
<!--            <version>${project.version}</version>-->
<!--        </dependency>-->

        <!-- ECLIPSE COLLECTIONS -->
        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections</artifactId>
        </dependency>
        <!-- ECLIPSE COLLECTIONS -->

        <!-- ENGINE -->
<!--        <dependency>-->
<!--            <groupId>org.finos.legend.engine</groupId>-->
<!--            <artifactId>legend-engine-xt-sql-pure</artifactId>-->
<!--        </dependency>-->

        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-xt-relationalStore-postgresSql-protocol</artifactId>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-xt-relationalStore-postgresSqlModel-pure</artifactId>
        </dependency>

        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-language-pure-compiler</artifactId>
        </dependency>
<!--         <dependency>-->
<!--            <groupId>org.finos.legend.engine</groupId>-->
<!--            <artifactId>legend-engine-language-pure-grammar</artifactId>-->
<!--        </dependency>-->

        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-xt-tds-grammar</artifactId>
            <version>${project.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-xt-tds-compiler</artifactId>
            <version>${project.version}</version>
            <scope>runtime</scope>
        </dependency>
        <!-- ENGINE -->

        <!-- TEST -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-shared-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-identity-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-pure-runtime-java-extension-shared-functions-legendCompiler</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.pure</groupId>
            <artifactId>legend-pure-runtime-java-engine-interpreted</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.finos.legend.engine</groupId>
            <artifactId>legend-engine-pure-runtime-java-extension-interpreted-functions-legendCompiler</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- TEST -->
    </dependencies>
</project>