<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mulesoft.connectivity.coda</groupId>
    <artifactId>coda-parent</artifactId>
    <version>0.0.2</version>
    <name>coda-connector</name>
    <packaging>pom</packaging>

    <parent>
        <!--  Parent pom documentation https://github.com/mulesoft/interpreted-connectivity-connector-parent-pom/tree/master/interpreted-connectivity-parent -->
        <groupId>com.mulesoft.connectivity</groupId>
        <artifactId>interpreted-connectivity-parent</artifactId>
        <version>1.4.3-6.codegen-error-mappings</version>
    </parent>

    <properties>
        <connector.name>coda</connector.name>
        <!-- This property can disable the validateConnectorModel from connectivity-flow-maven-plugin -->
        <!--        <skipFlowModelValidation>true</skipFlowModelValidation>-->
        <anypoint.connector.path>com::mulesoft::connectivity::${connector.name}::anypoint::Connector::connector</anypoint.connector.path>
    </properties>

    <modules>
        <module>coda-connectivity-model</module>
        <module>coda-flow-connector-model</module>
        <module>coda-anypoint-connector-model</module>
    </modules>

    <repositories>
        <!-- Public Nexus repository from which to download the Mulesoft dependencies -->
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Public Releases Repository</name>
            <url>https://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mulesoft.connectors.maven</groupId>
                <artifactId>connector-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.mule.weave</groupId>
                <artifactId>data-weave-maven-plugin</artifactId>
            </plugin>
            <plugin>
               <groupId>org.mule.tools.maven</groupId>
               <artifactId>exchange-mule-maven-plugin</artifactId>
               <version>0.0.9</version>
               <inherited>false</inherited>
               <executions>
                   <execution>
                       <id>validate</id>
                       <phase>validate</phase>
                       <goals>
                           <goal>exchange-pre-deploy</goal>
                       </goals>
                   </execution>
                   <execution>
                       <id>deploy</id>
                       <phase>deploy</phase>
                       <goals>
                           <goal>exchange-deploy</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Enable resolution of LW dependency in DW Extension -->
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-language</artifactId>
            <classifier>dw-library</classifier>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>runtime</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core-modules</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Test -->
        <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>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>java-module</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>mule-ci-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-ci-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>
