<?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>
  </parent>

  <groupId>com.threerings</groupId>
  <artifactId>gwt-utils</artifactId>
  <packaging>jar</packaging>
  <version>1.5</version>

  <name>GWT Utils</name>
  <description>Utilities for use in developing GWT applications.</description>
  <url>http://code.google.com/p/ooo-gwt-utils/</url>
  <issueManagement>
    <url>http://code.google.com/p/ooo-gwt-utils/issues/list</url>
  </issueManagement>

  <licenses>
    <license>
      <name>GNU Lesser General Public License (LGPL), Version 2.1</name>
      <url>http://www.fsf.org/licensing/licenses/lgpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>samskivert</id>
      <name>Michael Bayne</name>
      <email>mdb@samskivert.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:svn:http://ooo-gwt-utils.googlecode.com/svn/tags/gwt-utils-1.5</connection>
    <developerConnection>
      scm:svn:https://ooo-gwt-utils.googlecode.com/svn/tags/gwt-utils-1.5
    </developerConnection>
    <url>http://ooo-gwt-utils.googlecode.com/svn/tags/gwt-utils-1.5</url>
  </scm>

  <properties>
    <gwt.version>2.4.0</gwt.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.samskivert</groupId>
      <artifactId>samskivert</artifactId>
      <version>1.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-gwt</artifactId>
      <version>10.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwt.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>${gwt.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.8.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <!-- we include the source files in our main jar for use by GWT -->
    <resources>
      <resource>
        <directory>${project.build.sourceDirectory}</directory>
        <excludes>
          <exclude>com/threerings/gwt/rebind/**</exclude>
          <exclude>com/threerings/gwt/tools/**</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version><!--$NO-MVN-MAN-VER$ This quiets an m2e warning-->
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <target>
                <taskdef name="i18nsync" classpath="${basedir}/lib/i18nsync.jar" classname="com.threerings.gwt.tools.I18nSyncTask" />
                <i18nsync srcdir="${project.build.sourceDirectory}">
                  <fileset dir="${project.build.sourceDirectory}" includes="**/*Messages.properties" />
                </i18nsync>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${project.build.sourceDirectory}</directory>
              <includes>
                <include>**/*Messages.java</include>
              </includes>
            </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>
          <fork>true</fork>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <!-- yes, those quoted spaces are a workaround sanctioned by the Maven idiocracy -->
          <compilerArgument>-Xlint" "-Xlint:-serial" "-Xlint:-path</compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <quiet>true</quiet>
          <show>public</show>
          <excludePackageNames>javax.annotation:com.google.*</excludePackageNames>
          <links>
            <link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/</link>
            <link>http://evgeny-goldin.org/ant/api/</link>
            <link>http://docs.guava-libraries.googlecode.com/git/javadoc/</link>
            <link>http://samskivert.googlecode.com/svn/apidocs/</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.5</version>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <!-- Tell m2eclipse to ignore the enforcer plugin from our parent. Otherwise it warns
               about not being able to run it. -->
          <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,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.6,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property><name>performRelease</name><value>true</value></property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <keyname>mdb@samskivert.com</keyname>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
