<?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.anypoint</groupId>
        <artifactId>api-gateway-modules</artifactId>
        <version>4.7.2</version>
    </parent>

    <artifactId>mule-module-policies</artifactId>
    <packaging>jar</packaging>
    <name>API Gateway Policies Module</name>

    <properties>
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
        <skipExportTests>false</skipExportTests>
        <handlebars.version>4.3.1</handlebars.version>

        <javaModuleName>com.mulesoft.anypoint.gw.module.policies</javaModuleName>
    </properties>

    <dependencies>
        <!-- Gateway Dependencies -->
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-api</artifactId>
            <version>${apiGatewayApiVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-contract-service-api</artifactId>
            <version>${contractsServiceApiVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-core</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>mule-module-autodiscovery</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-client</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>mule-gatekeeper-policy-template</artifactId>
            <version>${project.version}</version>
            <classifier>mule-policy</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>mule-module-hdp</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Mule Dependencies -->
        <dependency>
            <groupId>com.mulesoft.mule.runtime.modules</groupId>
            <artifactId>mule-module-http-policy</artifactId>
            <version>${muleVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-deployment-model</artifactId>
            <version>${muleVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-deployment-model-impl</artifactId>
            <version>${muleVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-deployment</artifactId>
            <version>${muleVersion}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Other libs -->
        <dependency>
            <groupId>com.github.jknack</groupId>
            <artifactId>handlebars</artifactId>
            <version>${handlebars.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mozilla</groupId>
                    <artifactId>rhino</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test libs -->
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-backoff</artifactId>
            <version>${api.gateway.backoff.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>tita-unit</artifactId>
            <version>${apiGatewayTitaVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>tita-reflection-unit</artifactId>
            <version>${tita.unit.api.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>api-gateway-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>${httpclientVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.apache.commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-infrastructure</artifactId>
            <version>${muleVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-http-connector</artifactId>
            <version>${muleHttpConnectorVersion}</version>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>tita-tests-unit</artifactId>
            <version>${tita.unit.api.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.anypoint</groupId>
            <artifactId>tita-http-unit</artifactId>
            <version>${tita.unit.api.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-template</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.mulesoft.anypoint</groupId>
                                    <artifactId>mule-gatekeeper-policy-template</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>mule-policy</classifier>
                                    <destFileName>mule-gatekeeper-policy-template-mule-policy.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
