<?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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
    <relativePath></relativePath>
  </parent>

  <groupId>com.googlecode.playn</groupId>
  <artifactId>playn-project</artifactId>
  <packaging>pom</packaging>
  <version>1.9-SNAPSHOT</version>
  <name>PlayN Project</name>
  <url>http://code.google.com/p/playn</url>
  <description>Cross platform game library for N≥4 platforms.</description>

  <issueManagement>
    <system>Google Code</system>
    <url>http://code.google.com/p/playn/issues/list</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git://github.com/threerings/playn.git</connection>
    <developerConnection>scm:git:git@github.com:threerings/playn.git</developerConnection>
    <url>https://github.com/threerings/playn/</url>
  </scm>

  <modules>
    <module>android</module>
    <module>archetype</module>
    <module>core</module>
    <module>jbox2d</module>
    <module>html</module>
    <module>ios</module>
    <module>java</module>
    <module>swt-java</module>
    <module>tests</module>
    <module>webgl</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <android.version>4.1.1.4</android.version>
    <android.maven.version>3.6.0</android.maven.version>
    <swt.version>4.3</swt.version>
    <monotouch.version>6.0.6</monotouch.version>
    <gwt.version>2.6.0</gwt.version>
    <jbox2d.version>2.2.1.1</jbox2d.version>
    <lwjgl.version>2.9.0</lwjgl.version>
    <jinput.version>2.0.5</jinput.version>
    <!--
      GWT log levels:
      ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
    -->
    <gwt.loglevel>INFO</gwt.loglevel>
    <gwt.outputstyle>PRETTY</gwt.outputstyle>
    <gwt.modulesuffix />
    <gwt.inplace>false</gwt.inplace>
    <gwt.xdisable>true</gwt.xdisable>
    <gwt.draft>false</gwt.draft>
    <gwt.workers />
    <maven.test.skip>false</maven.test.skip>
  </properties>

  <repositories>
    <!-- TEMP: obtain some artifacts from legacy forplay maven repository -->
    <repository>
      <id>forplay-legacy</id>
      <url>http://forplay.googlecode.com/svn/mavenrepo</url>
    </repository>
  </repositories>

  <!-- Common dependencies for all modules -->
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <!-- Common plugin configuration for all children -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>2.6.0</version>
          <configuration>
            <logLevel>${gwt.loglevel}</logLevel>
            <style>${gwt.outputstyle}</style>
            <runTarget>${gwt.module}${gwt.modulesuffix}/index.html</runTarget>
            <hostedWebapp>${project.build.directory}/www</hostedWebapp>
            <draftCompile>${gwt.draft}</draftCompile>
            <disableCastChecking>${gwt.xdisable}</disableCastChecking>
            <disableClassMetadata>${gwt.xdisable}</disableClassMetadata>
            <disableRunAsync>true</disableRunAsync>
            <localWorkers>${gwt.workers}</localWorkers>
            <extraJvmArgs>-Xmx256m</extraJvmArgs>
            <modules>
              <module>${gwt.module}</module>
            </modules>
            <inplace>${gwt.inplace}</inplace>
          </configuration>
          <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>
          </dependencies>
        </plugin>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
          <configuration>
            <filesets>
              <fileset><directory>src/main/webapp/${gwt.module}</directory></fileset>
              <fileset><directory>src/main/webapp/${gwt.module}Dev</directory></fileset>
              <fileset><directory>src/main/webapp/${gwt.name}</directory></fileset>
              <fileset><directory>src/main/webapp/WEB-INF/classes</directory></fileset>
              <fileset><directory>tomcat</directory></fileset>
              <fileset><directory>www-test</directory></fileset>
              <fileset><directory>.gwt-tmp</directory></fileset>
            </filesets>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
            <compilerArgs>
              <arg>-Xlint</arg>
              <arg>-Xlint:-serial</arg>
              <arg>-Xlint:-path</arg>
            </compilerArgs>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>

        <!-- this shuts m2eclipse up about various Maven 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-dependency-plugin</artifactId>
                    <versionRange>[2.0,)</versionRange>
                    <goals>
                      <goal>unpack</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      com.jayway.maven.plugins.android.generation2
                    </groupId>
                    <artifactId>
                      android-maven-plugin
                    </artifactId>
                    <versionRange>
                      [3.1.1,)
                    </versionRange>
                    <goals>
                      <goal>generate-sources</goal>
                      <goal>unpack</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.pyx4j</groupId>
                    <artifactId>maven-junction-plugin</artifactId>
                    <versionRange>[1.0.3,)</versionRange>
                    <goals>
                      <goal>link</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>deploy-local</id>
      <distributionManagement>
        <repository>
          <id>deploy-local</id>
          <name>Local Maven repository</name>
          <url>${deploy-local.dir}</url>
        </repository>
        <snapshotRepository>
          <uniqueVersion>false</uniqueVersion>
          <id>deploy-local-snapshots</id>
          <name>Local Maven snapshot repository</name>
          <url>${deploy-local.dir}</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
</project>