<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.googlecode.playn</groupId>
    <artifactId>playn-project</artifactId>
    <version>1.7.2</version>
  </parent>

  <artifactId>playn-html</artifactId>
  <packaging>jar</packaging>
  <name>PlayN HTML</name>
  <description>The PlayN HTML (GWT) backend</description>

  <dependencies>
    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-core</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>

    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-webgl</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-webgl</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>

    <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>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.allen-sauer.gwt.log</groupId>
      <artifactId>gwt-log</artifactId>
      <version>3.1.8</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>com.allen-sauer.gwt.voices</groupId>
      <artifactId>gwt-voices</artifactId>
      <version>3.2.0</version>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>tests</testSourceDirectory>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>playn/super/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset><directory>war</directory></fileset>
            <fileset><directory>gwt-unitCache/</directory></fileset>
          </filesets>
        </configuration>
      </plugin>

      <!-- this symlinks some shared test code into tests/...; we can't commit
           a symlink in Git (breaks on Windows), so this should be more robust -->
      <plugin>
        <groupId>com.pyx4j</groupId>
        <artifactId>maven-junction-plugin</artifactId>
        <version>1.0.3</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>link</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <links>
            <link>
              <src>${basedir}/../core/tests/playn/shared/json</src>
              <dst>${basedir}/tests/playn/shared/json</dst>
            </link>
          </links>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <mode>htmlunit</mode>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
