<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>
    <artifactId>brooklyn-example-hello-world-hadoop-webapp</artifactId>
    <packaging>war</packaging>
    <name>hello-world-hadoop-webapp Maven Webapp</name>

    <parent>
        <groupId>io.brooklyn.example</groupId>
        <artifactId>brooklyn-examples-webapps-parent</artifactId>
        <version>0.4.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
        <relativePath>../pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.18</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
            <version>1.0.2</version>
        </dependency>
        <dependency>
            <groupId>io.brooklyn</groupId>
            <artifactId>brooklyn-example-hello-world-hadoop-jar</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.5.11</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>brooklyn-example-hello-world-hadoop-webapp</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <!-- copy the JAR so it is available in the WAR to deploy to hadoop -->
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <!-- this can fail in eclipse trying to copy _from_ target/classes. see http://jira.codehaus.org/browse/MDEP-259 -->
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>brooklyn-example-hello-world-hadoop-jar</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target/classes</outputDirectory>
                                    <destFileName>brooklyn-example-hello-world-hadoop-jar.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
