<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.mulesoft.connectivity</groupId>
        <artifactId>interpreted-connectivity-parent-pom</artifactId>
        <version>1.6.5</version>
    </parent>

    <artifactId>connectivity-bom-validation</artifactId>
    <packaging>pom</packaging>
    <description>
        Validates that all managed dependencies in the BOM and all managed plugin
        artifacts in the parent POM are resolvable. This module declares them as real
        dependencies so Maven forces resolution during the build. If any version
        property points to a non-existent artifact, this module's build will fail.
    </description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.mulesoft.connectivity</groupId>
                <artifactId>connectivity-tooling-bom</artifactId>
                <version>${bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--
            =====================================================================
            BOM managed dependencies (versions inherited from BOM import above)
            Keep in sync with connectivity-tooling-bom/pom.xml
            =====================================================================
        -->

        <!-- Connectivity Framework -->
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>ccm-codegen</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-model-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-fix-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-flow-tooling-support</artifactId>
        </dependency>

        <!-- Language Libraries (classifier: dw-library) -->
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-language</artifactId>
            <classifier>dw-library</classifier>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-flow-language</artifactId>
            <classifier>dw-library</classifier>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-mule-language</artifactId>
            <classifier>dw-library</classifier>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-dc-language</artifactId>
            <classifier>dw-library</classifier>
        </dependency>

        <!-- DataWeave -->
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>core-modules</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>java-module</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>http-netty-module</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>data-weave-testing-framework</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <!--
            =====================================================================
            Parent POM plugin artifacts (explicit versions from root properties)
            Keep in sync with interpreted-connectivity-parent/pom.xml pluginManagement
            =====================================================================
        -->
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>data-weave-maven-plugin</artifactId>
            <version>${data.weave.maven.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-flow-maven-plugin</artifactId>
            <version>${linkweave.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectors.maven</groupId>
            <artifactId>connector-maven-plugin</artifactId>
            <version>${connector.maven.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-dc-maven-plugin</artifactId>
            <version>${linkweave.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime.plugins</groupId>
            <artifactId>mule-extensions-maven-plugin</artifactId>
            <version>${mule.extensions.maven.plugin}</version>
        </dependency>

        <!-- Plugin dependencies (declared as deps of plugins in parent POM) -->
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-dc-extension</artifactId>
            <version>${linkweave.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-extensions-ic-support</artifactId>
            <version>${uc.mule.adapter.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.connectivity</groupId>
            <artifactId>connectivity-mule-persistence</artifactId>
            <version>${uc.mule.adapter.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Force dependency resolution when the project is being built -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <id>validate-bom-resolvability</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>resolve</goal>
                        </goals>
                        <!-- Output resolved dependencies in alphabetical order for easier parsing -->
                        <configuration>
                            <sort>true</sort>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!--
            =====================================================================
            Repositories should be kept in sync with connectivity-tooling-library
            scaffold template POMs. See README.md
            =====================================================================
        -->
    <repositories>
        <repository>
            <id>mule-public</id>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>mule-public</id>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public</url>
        </pluginRepository>
    </pluginRepositories>

</project>
