<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Nicolas Morel
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
    <artifactId>gwt-jackson-parent</artifactId>
    <groupId>com.github.nmorel.gwtjackson</groupId>
    <version>0.2.1</version>
  </parent>

  <artifactId>gwt-jackson</artifactId>

  <name>gwt-jackson :: API</name>
  <description>gwt-jackson is a GWT JSON serializer/deserializer mechanism based on Jackson annotations</description>
  <url>https://github.com/nmorel/gwt-jackson</url>

  <properties>
    <!-- the api has to be compatible with minimal jdk version supported by GWT -->
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>

    <!-- Dependencies version -->
    <gwt.version>2.5.1</gwt.version>
    <jackson.version>2.3.0</jackson.version>
    <junit.version>4.11</junit.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/client/**/*Test.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <extra>${project.build.directory}/gwt/extra</extra>
          <gen>${project.build.directory}/gwt/gen</gen>
          <persistentunitcachedir>${project.build.directory}/gwt/cache</persistentunitcachedir>
          <treeLogger>true</treeLogger>
        </configuration>
        <executions>
          <execution>
            <id>packaging</id>
            <goals>
              <goal>resources</goal>
            </goals>
            <configuration>
              <modules>
                <module>com.github.nmorel.gwtjackson.GwtJackson</module>
              </modules>
            </configuration>
          </execution>
          <execution>
            <id>test-dev-mode</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <mode>htmlunit</mode>
              <module>com.github.nmorel.gwtjackson.GwtJacksonTest</module>
              <out>${project.build.directory}/gwt/test/dev</out>
              <userAgents>gecko1_8</userAgents>
              <testTimeOut>300</testTimeOut>
            </configuration>
          </execution>
          <execution>
            <id>test-prod</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <mode>htmlunit</mode>
              <module>com.github.nmorel.gwtjackson.GwtJacksonTest</module>
              <out>${project.build.directory}/gwt/test/prod</out>
              <productionMode>true</productionMode>
              <userAgents>gecko1_8</userAgents>
              <testTimeOut>300</testTimeOut>
            </configuration>
          </execution>
        </executions>
        <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>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
          </dependency>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-codeserver</artifactId>
            <version>${gwt.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- GWT 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>

    <!-- Jackson annotation dependencies -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
      <classifier>sources</classifier>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
