<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.0</version>
  </parent>
  <artifactId>gxt-examples</artifactId>
  <packaging>war</packaging>
  <name>Sencha GXT Examples</name>
  <properties>
    <build.description>development build</build.description>
    <gwt.compiler.strict>true</gwt.compiler.strict>
    <gwt.test.testTimeOut>480</gwt.test.testTimeOut>
    <!-- Extra arguments to be given to the JVM hosting the GWT compiler -->
    <gwt.extraJvmArgs>-Xmx2g -XX:MaxPermSize=1g</gwt.extraJvmArgs>
  </properties>
  <repositories>
    <repository>
      <id>JBoss Repo</id>
      <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
      <name>JBoss Repo</name>
    </repository>
    <repository>
      <id>apache-snapshots</id>
      <url>http://people.apache.org/repo/m2-incubating-repository</url>
    </repository>
    <repository>
      <id>repo2-maven2</id>
      <url>http://repo2.maven.org/maven2</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>com.sencha.gxt</groupId>
      <artifactId>gxt-themebuilder</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
    <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>com.google.gwt</groupId>
      <artifactId>gwt-servlet</artifactId>
      <version>${gwt.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt.inject</groupId>
      <artifactId>gin</artifactId>
      <version>1.5.0</version>
    </dependency>
    <dependency>
      <groupId>com.sencha.gxt</groupId>
      <artifactId>gxt</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.sencha.gxt</groupId>
      <artifactId>gxt-chart</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.sencha.gxt</groupId>
      <artifactId>gxt-theme-neptune</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>2.0.0</version>
    </dependency>

    <!-- Support for our JPA persistence -->
    <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa-all</artifactId>
      <version>2.1.0</version>
    </dependency>

    <!-- RF annotation processing -->
    <dependency>
      <groupId>com.google.web.bindery</groupId>
      <artifactId>requestfactory-apt</artifactId>
      <version>${gwt.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- RF needs a JSON jar at runtime -->
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20090211</version>
      <scope>compile</scope>
    </dependency>

    <!-- javax.validation for RF bean validation -->
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <scope>compile</scope>
    </dependency>
    <!-- Simple javax.validation impl -->
    <dependency>
      <groupId>org.apache.bval</groupId>
      <artifactId>bval-jsr303</artifactId>
      <version>0.2-incubating</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/java</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>com.google.code.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <modules>
                <module>com.sencha.gxt.examples.resources.Resources</module>
                <module>com.sencha.gxt.explorer.Explorer</module>
                <module>com.sencha.gxt.desktop.Desktop</module>
                <module>com.sencha.gxt.desktopapp.DesktopApp</module>
              </modules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <includes>**/server/data/*.class</includes>
          <addDefaultConstructor>true</addDefaultConstructor>
          <toolProperties>
            <property>
              <name>directory</name>
              <value>${project.build.directory}/classes</value>
            </property>
          </toolProperties>
        </configuration>
        <executions>
          <execution>
            <id>enhancer</id>
            <phase>process-classes</phase>
            <goals>
              <goal>enhance</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa</artifactId>
            <version>2.1.0</version>
            <exclusions>
              <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
              </exclusion>
              <exclusion>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jms_1.1_spec</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.9.1</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <runOrder>random</runOrder>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <!-- Provide a classes jar for source in the dist zip -->
          <attachClasses>true</attachClasses>
          <webResources>
            <resource>
              <filtering>true</filtering>
              <directory>src/main/webapp</directory>
              <includes>
                <include>**/*.html</include>
              </includes>
            </resource>
          </webResources>
          <packagingExcludes>WEB-INF/deploy/**</packagingExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-desktop-example-classes</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>desktop</classifier>
              <includes>
                <include>com/sencha/gxt/desktop/**/*</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build 
          itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>
                      openjpa-maven-plugin
                    </artifactId>
                    <versionRange>[1.2,)</versionRange>
                    <goals>
                      <goal>enhance</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>true</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
                <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>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>8.1.9.v20130131</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>all-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>explorer-unit-tests</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <testTimeOut>${gwt.test.testTimeOut}</testTimeOut>
                  <mode>htmlunit</mode>
                  <!-- hack to make it take more time -->
                  <htmlunit>FF17 -testMethodTimeout 15</htmlunit>
                  <modules>
                    <module>com.sencha.gxt.examples.resources.Resources</module>
                    <module>com.sencha.gxt.explorer.Explorer</module>
                    <module>com.sencha.gxt.desktop.Desktop</module>
                    <module>com.sencha.gxt.desktopapp.DesktopApp</module>
                  </modules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
