<?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.15.4</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>

  <build>

    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>src/test/java</directory>
        <includes>
          <include>**/client/GwtJacksonTestCase*</include>
          <include>**/jackson/AbstractJacksonTest*</include>
          <include>**/shared/AbstractTester*</include>
          <include>**/shared/ObjectMapperTester*</include>
          <include>**/shared/ObjectReaderTester*</include>
          <include>**/shared/ObjectWriterTester*</include>
        </includes>
      </testResource>
    </testResources>

    <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>
        </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>
              <module>com.github.nmorel.gwtjackson.GwtJacksonTest</module>
              <out>${project.build.directory}/gwt/test/dev</out>
            </configuration>
          </execution>
          <execution>
            <id>test-prod</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <module>com.github.nmorel.gwtjackson.GwtJacksonTest</module>
              <out>${project.build.directory}/gwt/test/prod</out>
              <productionMode>true</productionMode>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>testJar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/client/GwtJacksonTestCase*</include>
                <include>**/jackson/AbstractJacksonTest*</include>
                <include>**/shared/AbstractTester*</include>
                <include>**/shared/ObjectMapperTester*</include>
                <include>**/shared/ObjectReaderTester*</include>
                <include>**/shared/ObjectWriterTester*</include>
                <include>**/GwtJacksonSharedTest.gwt.xml</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- GWT dependencies -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
    </dependency>

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

    <!-- Generator dependencies -->
    <dependency>
      <groupId>com.squareup</groupId>
      <artifactId>javapoet</artifactId>
    </dependency>

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

</project>
