<?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>modules-template</artifactId>
        <groupId>org.openprovenance.prov</groupId>
        <version>2.2.2</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>prov-template</artifactId>
    <name> |---- PROV-TEMPLATE</name>
    <packaging>jar</packaging>
    <description>A template system for PROV bundles.</description>


    <dependencies>
        <dependency>
            <groupId>org.openprovenance.prov</groupId>
            <artifactId>prov-model</artifactId>
            <version>2.2.2</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>

       <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>


        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>2.19.2</version>
            <scope>compile</scope>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>org.openprovenance.prov</groupId>
            <artifactId>prov-n</artifactId>
            <version>2.2.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.flipkart.zjsonpatch</groupId>
            <artifactId>zjsonpatch</artifactId>
            <version>0.4.14</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>${commons.text.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.openprovenance.prov</groupId>
            <artifactId>prov-jsonld</artifactId>
            <version>2.2.2</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <!--
            Maven plugin not available yet at this point in the build. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec.plugin.version}</version>
                <executions>
                    <execution>
                        <id>ajv.ttf.schema.generic</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>process-resources</phase>
                        <configuration>
                            <executable>ajv</executable>
                            <arguments>
                                <argument>-s</argument>
                                <argument>src/main/resources/jsonschema/template-transformation-file-schema.json</argument>
                                <argument>-d</argument>
                                <argument>src/main/resources/ttfs/ttf-generic.json</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ajv.ttb.schema.plead</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>process-resources</phase>
                        <configuration>
                            <executable>ajv</executable>
                            <arguments>
                                <argument>-s</argument>
                                <argument>src/main/resources/jsonschema/template-transformation-file-schema.json</argument>
                                <argument>-d</argument>
                                <argument>src/main/resources/ttfs/ttf-plead.json</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ajv.ttf.schema.ptm</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>process-resources</phase>
                        <configuration>
                            <executable>ajv</executable>
                            <arguments>
                                <argument>-s</argument>
                                <argument>src/main/resources/jsonschema/template-transformation-file-schema.json</argument>
                                <argument>-d</argument>
                                <argument>src/main/resources/ttfs/ttf-ptm.json</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ajv.ttf.schema.pg</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>process-resources</phase>
                        <configuration>
                            <executable>ajv</executable>
                            <arguments>
                                <argument>-s</argument>
                                <argument>src/main/resources/jsonschema/template-transformation-file-schema.json</argument>
                                <argument>-d</argument>
                                <argument>src/main/resources/ttfs/ttf-pg.json</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution> <!-- exec plugin: to exec main in Executor.java during test phase. -->
                        <id>default-cli</id>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <mainClass>org.openprovenance.prov.template.expander.ttf.BatchExecutor</mainClass>
                            <arguments>
                                <argument>${project.basedir}</argument>
                                <argument>${project.build.directory}/generated-templates</argument>
                                <argument>-configs</argument>
                                <argument>src/main/resources/ttfs/ttf-generic.json</argument>
                                <argument>src/main/resources/ttfs/ttf-plead.json</argument>
                                <argument>src/main/resources/ttfs/ttf-ptm.json</argument>
                                <argument>src/main/resources/ttfs/ttf-pg.json</argument>
                            </arguments>
                        </configuration>

                    </execution>
                </executions>
                <configuration>
                    <includePluginDependencies>true</includePluginDependencies>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.openprovenance.prov</groupId>
                        <artifactId>prov-dot</artifactId>
                        <version>2.2.2</version>
                    </dependency>
                    <dependency>
                        <groupId>org.openprovenance.prov</groupId>
                        <artifactId>prov-n</artifactId>
                        <version>2.2.2</version>
                    </dependency>
                </dependencies>
            </plugin>



            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${assembly.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>true</appendAssemblyId>
                            <descriptors>
                                <descriptor>${project.build.outputDirectory}/assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>16</source>
                    <target>16</target>
                </configuration>
            </plugin>


        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>


        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

    </build>



</project>
