<?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>1.4.3</version>
    </parent>
    <artifactId>mule-module-spring</artifactId>
    <packaging>jar</packaging>
    <name>Spring Extensions</name>
    <description>Provides extensions to use the Spring framework with Mule such as utilising the the Spring container to build components managed by Mule.</description>   

    <profiles>
        <profile>
            <id>java14</id>
            <activation>
                <jdk>1.4</jdk>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <!-- see mule-module-xml -->
                <dependency>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </dependency>
                <dependency>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </dependency>
                <!-- Needed for XSLT -->
                <dependency>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                    <version>1.4</version>
                    <exclusions>
                        <exclusion>
                            <groupId>jaxen</groupId>
                            <artifactId>jaxen</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>relaxngDatatype</groupId>
                            <artifactId>relaxngDatatype</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>isorelax</groupId>
                            <artifactId>isorelax</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>saxpath</groupId>
                            <artifactId>saxpath</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>msv</groupId>
                            <artifactId>msv</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>java5</id>
            <activation>
                <jdk>1.5</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                    <version>1.4</version>
                    <exclusions>
                        <!-- IMPORTANT for JDK5 -->
                        <exclusion>
                            <groupId>xml-apis</groupId>
                            <artifactId>xml-apis</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>jaxen</groupId>
                            <artifactId>jaxen</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>relaxngDatatype</groupId>
                            <artifactId>relaxngDatatype</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>isorelax</groupId>
                            <artifactId>isorelax</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>saxpath</groupId>
                            <artifactId>saxpath</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>msv</groupId>
                            <artifactId>msv</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    
    <dependencies>
        <!-- TODO This can't be in the parent pom.xml because it creates a cyclic dependency: 
                mule-tests-functional -> mule-module-builders -> mule-tests-functional -->
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-functional</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
        </dependency>

        <!-- Used by MuleEventMulticaster -->
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-builders</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-management</artifactId>
            <version>${version}</version>
        </dependency>

        <!-- Used by SpringTransactionFactory -->
        <!-- TODO: verify whether this dependency is really required. -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
        </dependency>

        <!--
            TODO this is a hack. Duplicate declaration (original is in the top pom.xml)
            makes Spring happy to compile when run from the project root folder,
            otherwise it cannot find classes from commons-logging.

            It seems m2 dependency visibility hierarchy is limited to 1 level deep.
        -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2</version>
        </dependency>

        <!-- For test cases only -->
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-client</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-http</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-vm</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
