<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Danilo Reinert
~
~ 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>
    <groupId>io.reinert.requestor.core</groupId>
    <artifactId>requestor-core-parent</artifactId>
    <version>0.2.0</version>
  </parent>

  <artifactId>requestor-api</artifactId>

  <dependencies>
    <!-- Requestor dependencies -->
    <dependency>
      <groupId>io.reinert.requestor.core</groupId>
      <artifactId>requestor-annotations</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- GWT dependencies -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>com.google.gwt.gwtmockito</groupId>
      <artifactId>gwtmockito</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <!-- Bundle sources with the jar, so they are visible to GWT's compiler -->
      <resource>
        <directory>src/main/java</directory>
      </resource>
      <!-- Bundle module descriptor with the jar, so it is visible to GWT's compiler -->
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <executions>
          <execution>
            <id>default-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>io/reinert/requestor/HasHttpSendMethods.*</exclude>
                <exclude>io/reinert/requestor/RequestSenderImpl.*</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>