<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.gwtplatform</groupId>
        <artifactId>gwtp</artifactId>
        <version>0.6</version>
    </parent>

    <groupId>com.gwtplatform</groupId>
    <artifactId>gwtp-core</artifactId>
    <packaging>pom</packaging>
    <name>GWTP Core</name>

    <modules>
        <module>gwtp-all</module>
        <module>gwtp-mvp-client</module>
        <module>gwtp-clients-common</module>
        <module>gwtp-dispatch-client</module>
        <module>gwtp-dispatch-shared</module>
        <module>gwtp-dispatch-server</module>
        <module>gwtp-dispatch-server-guice</module>
        <module>gwtp-dispatch-server-spring</module>
        <module>gwtp-dispatch-test</module>
        <module>gwtp-tester</module>
        <module>gwtp-processors</module>
        <module>gwtp-crawler</module>
        <module>gwtp-crawler-service</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${gwt-maven-plugin.version}</version>
                <configuration>
                    <extraJvmArgs>-Xss1024k -Xmx512M</extraJvmArgs>
                    <includes>**/*GwtTest.java,**/*GwtTestSuite.java</includes>
                    <mode>htmlunit</mode>
                    <testTimeOut>180</testTimeOut>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>

                <dependencies>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-user</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-servlet</artifactId>
                        <version>${gwt.version}</version>
                    </dependency>
              </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <!-- Allow junit to be inherited by every sub module -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- Sub-modules -->
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-crawler</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-crawler-service</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <!-- Even though this is not needed server-side, we do not use a provided
                scope as this dependency is always included transitively. -->
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-clients-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-dispatch-shared</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.gwtplatform</groupId>
                <artifactId>gwtp-dispatch-client</artifactId>
                <version>${project.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-dispatch-server</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-dispatch-server-guice</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-dispatch-server-spring</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-dispatch-test</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-mvp-client</artifactId>
                <version>${project.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->				
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-processors</artifactId>
                <version>${project.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>gwtp-tester</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Google Web Toolkit dependencies -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-dev</artifactId>
                <version>${gwt.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!-- DI dependencies -->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-servlet</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-assistedinject</artifactId>
                <version>${guice.version}</version>
            </dependency>
            <dependency>
                <groupId>aopalliance</groupId>
                <artifactId>aopalliance</artifactId>
                <version>${aopalliance.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.gwt.inject</groupId>
                <artifactId>gin</artifactId>
                <version>${gin.version}</version>
                <scope>provided</scope> <!-- Not needed server-side -->
            </dependency>

            <!-- Standard Java extension jars -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>${servlet-api.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${javax.inject.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>persistence-api</artifactId>
                <version>${persistence-api.version}</version>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>org.jukito</groupId>
                <artifactId>jukito</artifactId>
                <version>${jukito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-sign-artifacts</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>