<?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>com.mulesoft.mule.tests</groupId>
        <artifactId>mule-tests</artifactId>
        <version>4.5.0-20220922</version>
    </parent>
    <artifactId>mule-tests-cache</artifactId>
    <packaging>jar</packaging>
    <name>Mule EE Tests: Cache</name>
    <description>Mule EE Tests for Cache Support</description>

    <properties>
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Mule Runtime Dependencies -->
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-core</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.runtime</groupId>
            <artifactId>mule-core-ee</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.runtime.modules</groupId>
            <artifactId>mule-module-spring-config-ee</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <!--TODO: MULE-10837-->
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-service</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.services</groupId>
            <artifactId>mule-service-scheduler</artifactId>
            <classifier>mule-service</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-service-http-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.services</groupId>
            <artifactId>mule-service-http</artifactId>
            <classifier>mule-service</classifier>
            <scope>provided</scope>
        </dependency>

        <!-- Required extensions -->
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-http-connector</artifactId>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-objectstore-connector</artifactId>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.module</groupId>
            <artifactId>mule-java-module</artifactId>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-spring-test-plugin</artifactId>
            <version>${muleSpringModuleTestVersion}</version>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-sockets-connector</artifactId>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-extensions-support</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-extensions-spring-support</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Unit tests only -->
        <dependency>
            <groupId>org.springmodules</groupId>
            <artifactId>spring-modules-cache</artifactId>
            <version>0.9</version>
            <exclusions>
                <exclusion>
                    <groupId>tangosol</groupId>
                    <artifactId>tangosol-coherence</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-mock</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>gigaspaces</groupId>
                    <artifactId>gigaspaces-ce</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>jsk-lib</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>jsk-platform</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>mahalo</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>reggie</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>start</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>boot</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jini</groupId>
                    <artifactId>webster</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-attributes</groupId>
                    <artifactId>commons-attributes-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-attributes</groupId>
                    <artifactId>commons-attributes-compiler</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-lang3</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>concurrent</groupId>
                    <artifactId>concurrent</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib-nodep</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.sf.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-cache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-jmx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-minimal</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>jboss-system</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>backport-util-concurrent</groupId>
                    <artifactId>backport-util-concurrent</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jcs</groupId>
                    <artifactId>jcs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jgroups</groupId>
                    <artifactId>jgroups-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>geronimo-spec</groupId>
                    <artifactId>geronimo-spec-jta</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>opensymphony</groupId>
                    <artifactId>oscache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>oro</groupId>
                    <artifactId>oro</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xpp3</groupId>
                    <artifactId>xpp3_min</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xjavadoc</groupId>
                    <artifactId>xjavadoc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xstream</groupId>
                    <artifactId>xstream</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>clover</groupId>
                    <artifactId>clover</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>easymock</groupId>
                    <artifactId>easymock</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>easymock</groupId>
                    <artifactId>easymockclassextension</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mule.tests.plugin</groupId>
            <artifactId>mule-tests-component-plugin</artifactId>
            <version>${project.version}</version>
            <classifier>mule-plugin</classifier>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-runner</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-functional</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-unit</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.tests</groupId>
            <artifactId>mule-tests-allure</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.httpcache4j</groupId>
            <artifactId>httpcache4j-core</artifactId>
            <optional>true</optional>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-dwb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.services</groupId>
            <artifactId>mule-service-weave-ee</artifactId>
            <classifier>mule-service</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.services</groupId>
            <artifactId>mule-service-http</artifactId>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <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.weave:*</exclude>
                                                <exclude>org.mule.services:mule-service-weave</exclude>
                                                <exclude>com.mulesoft.services:mule-service-weave-ee</exclude>
                                                <exclude>org.mule.runtime:mule-dwb-api</exclude>

                                                <exclude>org.mule.tests:test-components</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>
