<?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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>errai-parent</artifactId>
    <groupId>org.jboss.errai</groupId>
    <version>3.1.1.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>errai-navigation</artifactId>
  <name>Errai::Navigation</name>

  <build>
    <resources>
      <resource>
        <directory>src/main/java</directory>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-client</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-client</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-javax-enterprise</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Utility methods from Errai Marshalling are required at GWT compile 
      (rebind) time -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-marshalling</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-gwt</artifactId>
    </dependency>

    <!-- GWT -->
    <!-- Must come after errai-common is inherited for patched JUnitShell -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-weld-integration</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>      
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <profiles>
    <profile>
      <id>integration-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <includes>
                <include>**/rebind/**/*Test.java</include>
                <include>**/rebind/**/*Tests.java</include>
              </includes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <forkMode>always</forkMode>
              <argLine>-Xmx1500m ${argLine}</argLine>
              <useManifestOnlyJar>true</useManifestOnlyJar>

              <systemProperties>
                <property>
                  <name>java.io.tmpdir</name>
                  <value>${project.build.directory}</value>
                </property>
                <property>
                  <name>log4j.output.dir</name>
                  <value>${project.build.directory}</value>
                </property>

                <!-- Disable caching of generated code -->
                <property>
                  <name>errai.devel.nocache</name>
                  <value>true</value>
                </property>
              </systemProperties>

              <excludes>
                <exclude>**/rebind/**</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
