<?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.examples</groupId>
        <artifactId>mule-example-loanbroker-parent</artifactId>
        <version>1.0</version>
    </parent>
    <artifactId>mule-example-loanbroker-esb</artifactId>
    <packaging>jar</packaging>
    <name>Loan Broker ESB Example</name>

    <dependencies>
        <dependency>
            <groupId>org.mule.examples</groupId>
            <artifactId>mule-example-loanbroker-common</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.examples</groupId>
            <artifactId>mule-example-loanbroker-common-tests</artifactId>
            <version>${muleVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.examples</groupId>
            <artifactId>mule-example-loanbroker-credit-agency</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>openejb</groupId>
            <artifactId>openejb-core</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
            <exclusions>
                <!-- exclude older concurrency backport -->
                <exclusion>
                    <groupId>backport-util-concurrent</groupId>
                    <artifactId>backport-util-concurrent</artifactId>
                </exclusion>
                <!-- Tries to pull an unpublished castor version -->
                <exclusion>
                    <groupId>castor</groupId>
                    <artifactId>castor</artifactId>
                </exclusion>
                <!-- we like slf4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <!-- no old xerces please -->
                <!-- apparently scope=provided and dependencyManagement don't get along? -->
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <!-- But still need castor at runtime -->
            <groupId>castor</groupId>
            <artifactId>castor</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>4.1.0-incubator</version>
            <scope>provided</scope>
            <!-- Exclude everything except activeio-core -->
            <exclusions>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jms_1.1_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-jaas</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-pool</groupId>
                    <artifactId>commons-pool</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.derby</groupId>
                    <artifactId>derby</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>activemq</groupId>
                    <artifactId>jmdns</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.xbean</groupId>
                    <artifactId>xbean-spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>backport-util-concurrent</groupId>
                    <artifactId>backport-util-concurrent</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>howl</groupId>
                    <artifactId>howl-logger</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>geronimo</groupId>
                    <artifactId>geronimo-kernel</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>geronimo</groupId>
                    <artifactId>geronimo-j2ee</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>activesoap</groupId>
                    <artifactId>jaxp-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>mx4j</groupId>
                    <artifactId>mx4j-jmx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>mx4j</groupId>
                    <artifactId>mx4j-remote</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>mx4j</groupId>
                    <artifactId>mx4j-tools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>mx4j</groupId>
                    <artifactId>mx4j-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-spring-config</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-ejb</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-jms</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-vm</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-axis</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-spring-extras</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>2.0.7</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- "mvn install" will copy the target jar to the $MULE_HOME/lib/user directory,
                overwriting the previous one. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-artifact</id>
                        <phase>install</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${MULE_HOME}/lib/user</outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${groupId}</groupId>
                                    <artifactId>${artifactId}</artifactId>
                                    <version>${version}</version>
                                    <destFileName>${artifactId}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.activemq</groupId>
                                    <artifactId>activemq-core</artifactId>
                                    <version>4.1.0-incubator</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.activemq</groupId>
                                    <artifactId>activeio-core</artifactId>
                                    <version>3.0.0-incubator</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>openejb</groupId>
                                    <artifactId>openejb-core</artifactId>
                                    <version>1.0</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>castor</groupId>
                                    <artifactId>castor</artifactId>
                                    <version>1.0</version>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
