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

    <parent>
        <groupId>com.mulesoft.connectivity</groupId>
        <artifactId>rest-sdk-all</artifactId>
        <version>0.1.6</version>
    </parent>

    <artifactId>rest-sdk-java-generator</artifactId>

    <properties>
        <formatterConfigPath>../formatter.xml</formatterConfigPath>
        <!-- property project_version is used to decouple how the pom.vm file is generated to point to the right rest-sdk-commons version -->
        <project_version>${project.version}</project_version>
    </properties>

    <dependencies>
        <dependency>
            <!-- TODO: should this dependency be here or in rest-sdk-connector-descriptor module? -->
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>rest-sdk-aml</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>rest-sdk-commons</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>rest-sdk-connector-model</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>

        <dependency>
            <groupId>org.apache.velocity.tools</groupId>
            <artifactId>velocity-tools-generic</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
            <version>1.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.googlejavaformat</groupId>
            <artifactId>google-java-format</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20201115</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.mule.sdk</groupId>
            <artifactId>mule-sdk-api</artifactId>
            <!-- TODO: this one was should be test, it might be an issue around classloading-->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-service-http-api</artifactId>
            <!-- TODO: this one was should be test, it might be an issue around classloading-->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-json</artifactId>
            <!-- TODO: this one was should be test, it might be an issue around classloading-->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- This stays down here: conflicts with
             dep needed: org.json:json:jar:20200518
             but dep obtained: com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1 -->
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>1.5.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>write-project-properties</goal>
                        </goals>
                        <configuration>
                            <outputFile>${project.build.outputDirectory}/properties-from-pom.properties</outputFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
