<?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>

    <groupId>org.mule.examples</groupId>
    <artifactId>mule-example-echo</artifactId>
    <version>1.0</version>
    <name>Echo Example</name>
    <description>Is a simple component example that demostrates how to expose a component over multiple transports (soap and stream).</description>

    <properties>
        <muleVersion>2.2.1</muleVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-core</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-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>
        <!-- Needed for CXF -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.0_spec</artifactId>
            <version>1.1.1</version>
        </dependency>

        <!-- Better testing of XML -->
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-functional</artifactId>
            <version>${muleVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-servlet_2.5_spec</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>codehaus</id>
            <name>Codehaus Maven 2.x Release Repository</name>
            <url>http://repository.codehaus.org</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>codehaus-snapshots</id>
            <name>Codehaus Maven 2.x Snapshots Repository</name>
            <url>http://snapshots.repository.codehaus.org</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <!--
            This is actually from cxf's pom an shouldn't be necessary here.
            -->
        <repository>
            <id>java.net</id>
            <name>Java.net Repository</name>
            <url>http://download.java.net/maven/1/</url>
            <layout>legacy</layout>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>apache-plugin-snapshots</id>
            <name>Apache Maven Plugins Snapshot Repository</name>
            <url>http://people.apache.org/maven-snapshot-repository</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <defaultGoal>install</defaultGoal>
        <finalName>${artifactId}</finalName>

        <!-- Allow config files to be in the "conf" directory to make it easier for users to find them. -->
        <resources>
            <resource>
                <directory>conf</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <encoding>ISO-8859-1</encoding>
                </configuration>
            </plugin>

            <!-- "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>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
