<?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-hello</artifactId>
    <version>1.0</version>
    <name>Hello Example</name>
    <description>Shows how to configure multiple components to interact on a single request and how to manage event transformations.</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.modules</groupId>
            <artifactId>mule-module-spring-extras</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-stdio</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-http</artifactId>
            <version>${muleVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-vm</artifactId>
            <version>${muleVersion}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-core</artifactId>
            <version>${muleVersion}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </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>
    </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>
            <!-- "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>
