<?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>reference-connector-parent</artifactId>
        <version>1.6.0-586.develop</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>reference-connector-flow-client-credentials-connector-model</artifactId>
    <packaging>dw-library</packaging>

    <properties>
        <pathToTop>../..</pathToTop>
        <hamcrest.version>3.0</hamcrest.version>
        <junit.jupiter.version>6.0.0</junit.jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-flow-language</artifactId>
            <classifier>dw-library</classifier>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-flow-extension</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>reference-connector-connectivity-model</artifactId>
            <version>${project.version}</version>
            <classifier>dw-library</classifier>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>parser</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>runtime</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core-modules</artifactId>
            <version>${data.weave.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>data-weave-testing-framework</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>http-netty-module</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>java-module</artifactId>
            <scope>test</scope>
        </dependency>

        <!--Test dependencies -->
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-model-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mulesoft.connectivity</groupId>
                <artifactId>connectivity-flow-maven-plugin</artifactId>
                <version>${project.version}</version>
                <configuration>
                    <dwRef>com::mulesoft::connectivity::clientCredentials::reference::connector::Connector::connector</dwRef>
                    <releaseStatus>GA</releaseStatus>
                </configuration>
                <executions>
                    <execution>
                        <id>build-static-metadata</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>validateConnectorModel</goal>
                            <goal>createFlowStaticMetaData</goal>
                        </goals>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>com.mulesoft.connectivity</groupId>
                        <artifactId>connectivity-flow-tooling-support</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-prod-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <overwrite>true</overwrite>
                            <outputDirectory>${project.build.outputDirectory}/com/mulesoft/connectivity/clientCredentials/reference/connector</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/dw/com/mulesoft/connectivity/clientCredentials/reference/connector</directory>
                                    <include>**/Connector.dwl</include>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
