<?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.modules</groupId>
        <artifactId>mule-modules</artifactId>
        <version>3.5.0</version>
    </parent>
    <artifactId>mule-module-logging</artifactId>
    <packaging>jar</packaging>
    <name>Mule Logging</name>

    <properties>
        <licensePath>../../LICENSE_HEADER.txt</licensePath>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>org.slf4j:jcl-over-slf4j</include>
                                    <include>org.slf4j:slf4j-log4j12</include>
                                    <include>org.slf4j:slf4j-api</include>
                                </includes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>org.slf4j:jcl-over-slf4j</artifact>
                                    <excludes>
                                        <!--
                                            We want to statically bind the logging system, but at
                                            the same time override the jcl-over-slf4j static init
                                            by providing our own 'replacement' version.
                                        -->
                                        <exclude>org/apache/commons/logging/LogFactory.class</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>org.slf4j:slf4j-log4j12</artifact>
                                    <excludes>
                                        <!--
                                            Only a single implementation is allowed when binding
                                            statically, and we want it to be ours.
                                        -->
                                        <exclude>org/slf4j/impl/Log4jLoggerFactory.class</exclude>
                                        <exclude>org/slf4j/impl/StaticLoggerBinder.class</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                        <exclude>META-INF/maven/org.slf4j/**</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        
    </dependencies>

</project>
