<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.mule.runtime</groupId>
        <artifactId>mule</artifactId>
        <version>4.9.13</version>
        <relativePath></relativePath>
    </parent>
  
    <groupId>org.mule.tests</groupId>
    <artifactId>mule-extensions-integration-tests</artifactId>
    <version>4.9.13</version>

    <packaging>pom</packaging>
    <name>Mule Tests</name>

    <modules>
        <module>artifact-ast-tests</module>
        <module>dsl</module>
        <module>extensions-client-deprecated</module>
        <module>extensions-mule-support</module>
        <module>extensions-xml-support</module>
        <module>integration</module>
        <module>integration-config-failures</module>
        <module>logging</module>
        <module>metrics</module>
        <module>munit-tests</module>
        <module>oauth</module>
        <module>performance</module>
        <module>schedulers-tests</module>
        <module>security</module>
        <module>single-app-mode</module>
        <module>single-app-mode-env-variables</module>
        <module>spring</module>
        <module>tooling-support-tests</module>
        <module>tracing</module>
    </modules>

    <properties>
        <munit.version>3.6.3</munit.version>

        <muleDependenciesVersion>1.1.0-rc2</muleDependenciesVersion>
        <muleTestComponentsVersion>4.9.13</muleTestComponentsVersion>

        <muleBomVersion>4.9.13</muleBomVersion>

        <skipMuleModuleMojos>true</skipMuleModuleMojos>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.mulesoft.mule.runtime.bom</groupId>
                <artifactId>mule-test-dependencies-bom</artifactId>
                <version>${muleDependenciesVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.services</groupId>
                <artifactId>mule-service-weave</artifactId>
                <classifier>mule-service</classifier>
                <version>${weaveVersion}</version>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.mule.tests</groupId>
                <artifactId>test-components</artifactId>
                <classifier>mule-plugin</classifier>
                <version>${muleTestComponentsVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

  <dependencies>
     <dependency>
        <groupId>org.mule.runtime</groupId>
        <artifactId>mule-dwb-api</artifactId> 
        <scope>provided</scope>         
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>mule</id>
      <name>Mule Repository</name>
      <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>mule-plugin</id>
      <name>Mule Repository</name>
      <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <profiles>
    <profile>
      <id>release</id>
      <properties>
        <skipNoSnapshotsEnforcerPluginRule>false</skipNoSnapshotsEnforcerPluginRule>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven.enforcer.plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots-in-deps</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed in Deps!</message>
                      <excludes>
                        <exclude>org.mule.modules:mule-spring-module</exclude>
                        <exclude>org.mule.modules:mule-spring-module-tests</exclude>
                        <exclude>org.mule.modules:mule-spring-test-plugin</exclude>
                      </excludes>
                    </requireReleaseDeps>
                    <requireReleaseVersion>
                      <message>No Snapshots Allowed in Project Version!</message>
                    </requireReleaseVersion>
                    <requirePluginVersions>
                      <message>Best Practice is to always define plugin versions!</message>
                      <unCheckedPluginList>
                        org.apache.maven.plugins:maven-clean-plugin
                      </unCheckedPluginList>
                    </requirePluginVersions>
                  </rules>
                  <skip>${skipNoSnapshotsEnforcerPluginRule}</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release-dry-run</id>
      <properties>
        <skipNoSnapshotsEnforcerPluginRule>false</skipNoSnapshotsEnforcerPluginRule>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven.enforcer.plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots-in-deps</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed in Deps!</message>
                      <excludes>
                        <exclude>com.mulesoft.munit:*</exclude>
                        <exclude>org.mule.weave:*</exclude>
                        <exclude>org.mule.runtime:mule-dwb-api</exclude>
                        <exclude>org.mule.services:*</exclude>
                        <exclude>org.mule.tools.maven:mule-classloader-model</exclude>
                        <exclude>org.mule.modules:mule-module-cors-kernel</exclude>

                        <exclude>org.mule.modules:mule-spring-module</exclude>
                        <exclude>org.mule.modules:mule-spring-module-tests</exclude>
                        <exclude>org.mule.modules:mule-spring-test-plugin</exclude>
                      </excludes>
                    </requireReleaseDeps>
                    <requireReleaseVersion>
                      <message>No Snapshots Allowed in Project Version!</message>
                    </requireReleaseVersion>
                    <requirePluginVersions>
                      <message>Best Practice is to always define plugin versions!</message>
                      <unCheckedPluginList>
                        org.apache.maven.plugins:maven-clean-plugin
                      </unCheckedPluginList>
                    </requirePluginVersions>
                  </rules>
                  <skip>${skipNoSnapshotsEnforcerPluginRule}</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
