<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.sencha.gxt</groupId>
    <artifactId>gxt-parent</artifactId>
    <version>3.1.1</version>
  </parent>
  <artifactId>gxt</artifactId>
  <name>Sencha GXT</name>
  <properties>
    <maven.build.timestamp.format>MM/dd/yyyy hh:mm</maven.build.timestamp.format>
    <timestamp>${maven.build.timestamp}</timestamp>
    <gwt.test.testTimeOut>240</gwt.test.testTimeOut>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwt.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>${gwt.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <classifier>sources</classifier>
    </dependency>

    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20090211</version>
    </dependency>

    <!-- The RF APT tools added on the test classpath to ensure the RF proxy works -->
    <dependency>
      <groupId>com.google.web.bindery</groupId>
      <artifactId>requestfactory-apt</artifactId>
      <version>${gwt.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- Mockito lets us verify that GXT classes can be mocked correctly -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.google.code.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
      </plugin>
      <!-- Run GWT and JVM unit tests, and GWT benchmarks -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>**/GXTTestSuite.java</includes>
          <testTimeOut>${gwt.test.testTimeOut}</testTimeOut>
          <strict>true</strict>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>emma-maven-plugin</artifactId>
        <version>1.0-alpha-3</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <id>verify-modules</id>
            <phase>test</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>java</executable>
              <classpathScope>compile</classpathScope>
              <arguments>
                <argument>-cp</argument>
                <classpath />
                <argument>com.google.gwt.dev.CompileModule</argument>
                <argument>-strict</argument>
                <argument>-out</argument>
                <argument>target/precompile</argument>
                <argument>com.sencha.gxt.core.Core</argument>
                <argument>com.sencha.gxt.messages.Messages</argument>
                <argument>com.sencha.gxt.data.Data</argument>
                <argument>com.sencha.gxt.fx.Fx</argument>
                <argument>com.sencha.gxt.cell.core.Core</argument>
                <argument>com.sencha.gxt.widget.core.Core</argument>
                <argument>com.sencha.gxt.state.State</argument>
                <argument>com.sencha.gxt.theme.base.Base</argument>
                <argument>com.sencha.gxt.theme.blue.Blue</argument>
                <argument>com.sencha.gxt.dnd.core.DND</argument>
                <argument>com.sencha.gxt.ui.GXT</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
  </build>
  <profiles>
    <profile>
      <id>benchmark</id>
      <properties>
        <!-- When running this profile, be sure to set a test mode, and configure it -->
        <gwt.test.mode>invalid</gwt.test.mode>
      </properties>
      <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <includes>**/benchmark/**/*Benchmark.java</includes>
              <productionMode>true</productionMode>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.seleniumhq.selenium</groupId>
          <artifactId>selenium-java</artifactId>
          <version>2.16.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
