<?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.5.0-355.develop</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>dc-reference-connector-connector-model</artifactId>
    <packaging>dw-library</packaging>

    <properties>
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
        <licensePath>../../LICENSE_HEADER.txt</licensePath>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--Test dependencies -->
            <dependency>
                <groupId>org.mule.weave</groupId>
                <artifactId>data-weave-testing-framework</artifactId>
                <version>${dc.data.weave.testing.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.weave</groupId>
                <artifactId>http-netty-module</artifactId>
                <version>${dc.data.weave.http.netty.module.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.weave</groupId>
                <artifactId>java-module</artifactId>
                <version>${dc.data.weave.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

        <!--Test dependencies -->
        <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>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.mule.weave</groupId>
                    <artifactId>data-weave-maven-plugin</artifactId>
                    <version>${dc.data.weave.maven.plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <tests>
                            <htmlReport>false</htmlReport>
                            <coverageEnabled>true</coverageEnabled>
                            <coverageFormat>sonar</coverageFormat>
                        </tests>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.mule.weave</groupId>
                <artifactId>data-weave-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.mulesoft.connectivity</groupId>
                <artifactId>connectivity-dc-maven-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <id>build-connection-definition-file</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>buildDefinitionFiles</goal>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>com.mulesoft.connectivity</groupId>
                        <artifactId>connectivity-dc-extension</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>
