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

    <!-- POM file generated with GWT webAppCreator -->
    <modelVersion>4.0.0</modelVersion>
    <artifactId>tigase-web-ui</artifactId>
    <packaging>war</packaging>
    <name>Sure.IM site</name>

    <parent>
        <groupId>tigase.sure.web</groupId>
        <artifactId>tigase-web-ui-parent</artifactId>
        <version>2.4.0-SNAPSHOT</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>tigase.sure.web</groupId>
            <artifactId>tigase-web-ui-theme</artifactId>
            <version>${project.parent.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <!-- Generate compiled stuff in the folder used for developing mode -->
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${webappDirectory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <filtering>true</filtering>
                                    <includes>
                                        <include>generatedProps.js</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- GWT Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test</goal>
                            <goal>i18n</goal>
                            <goal>generateAsync</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- Plugin configuration. There are many available options, see
                gwt-maven-plugin documentation at codehaus.org -->
                <configuration>
                    <localWorkers>8</localWorkers>
                    <optimize>9</optimize>
                    <draftCompile>false</draftCompile>
                    <disableClassMetadata>true</disableClassMetadata>
                    <runTarget>index.html</runTarget>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                    <i18nMessagesBundle>tigase.sure.web.site.client.Messages</i18nMessagesBundle>
                    <extraJvmArgs>-Xmx512m</extraJvmArgs>
                </configuration>
            </plugin>

            <!-- Copy static web files before executing gwt:run -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>exploded</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <webappDirectory>${webappDirectory}</webappDirectory>
                    <packagingExcludes>
                        WEB-INF/lib/*.jar
                    </packagingExcludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
