<?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>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.mule.examples</groupId>
            <artifactId>mule-example-loanbroker-common-tests</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.examples</groupId>
            <artifactId>mule-example-loanbroker-credit-agency</artifactId>
            <version>1.0</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>${activemqVersion}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-scripting</artifactId>
            <version>${muleVersion}</version>
        </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-jetty</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.transports</groupId>
            <artifactId>mule-transport-cxf</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-http</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-spring-extras</artifactId>
            <version>${muleVersion}</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>${activemqVersion}</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>
