<?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">
    <parent>
        <artifactId>gwt-material-parent</artifactId>
        <groupId>com.github.gwtmaterialdesign</groupId>
        <version>1.5.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.gwtmaterialdesign</groupId>
    <artifactId>gwt-material-basic</artifactId>
    <version>1.2</version>

    <packaging>war</packaging>
    <name>GWTP Basic</name>

    <properties>
        <!-- client -->
        <gwt.version>2.7.0</gwt.version>
        <gwtp.version>1.4</gwtp.version>
        <gin.version>2.1.2</gin.version>
        <gwt-material.version>1.5.2</gwt-material.version>
        <gwt.style>OBF</gwt.style>

        <!-- maven -->
        <maven-war-plugin.version>2.6</maven-war-plugin.version>
        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>

        <target.jdk>1.7</target.jdk>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${target.jdk}</source>
                    <target>${target.jdk}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <!-- GWT -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${gwt.version}</version>
                <configuration>
                    <strict>true</strict>

                    <testTimeOut>180</testTimeOut>
                    <mode>htmlunit</mode>
                    <includes>**/*GwtTest.java</includes>

                    <logLevel>INFO</logLevel>

                    <runTarget>index.html</runTarget>
                    <module>com.github.gwtmaterialdesign.GwtMaterialBasic</module>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- GWT -->
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- GWTP -->
        <dependency>
            <groupId>com.gwtplatform</groupId>
            <artifactId>gwtp-mvp-client</artifactId>
            <version>${gwtp.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- GwtMaterial -->
        <dependency>
            <groupId>com.github.gwtmaterialdesign</groupId>
            <artifactId>gwt-material</artifactId>
            <version>${gwt-material.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.gwtmaterialdesign</groupId>
            <artifactId>gwt-material-themes</artifactId>
            <version>${gwt-material.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.gwtmaterialdesign</groupId>
            <artifactId>gwt-material-addins</artifactId>
            <version>${gwt-material.version}</version>
        </dependency>

        <!-- DI -->
        <dependency>
            <groupId>com.google.gwt.inject</groupId>
            <artifactId>gin</artifactId>
            <version>${gin.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
