<?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>
    <groupId>org.drools</groupId>
    <artifactId>drools-wb-verifier</artifactId>
    <version>7.32.0.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>drools-wb-verifier-webworker</artifactId>

  <name>Drools Workbench - Verifier Web Worker</name>
  <description>Drools Workbench - GWT compiles the web worker verification uses and serves the result with a servlet.</description>

  <properties>
    <java.module.name>org.drools.wb.verifier.backend</java.module.name>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wb-verifier-guided-decision-table-adapter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.services</groupId>
      <artifactId>kie-wb-common-verifier-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.workbench.services</groupId>
      <artifactId>kie-wb-common-verifier-service</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jaxrs-client</artifactId>
    </dependency>

    <!-- GWT and GWT Extensions -->
    <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.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/org/drools/workbench/services/verifier/webworker/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <webappDirectory>${project.build.directory}/classes/</webappDirectory>

          <deploy>${project.build.directory}/gwt-symbols-deploy</deploy>
          <extraJvmArgs>-Xmx3G -Xms1024m -Xss1M -XX:CompileThreshold=7000
            -Derrai.dynamic_validation.enabled=true
            -Derrai.marshalling.server.classOutput.enabled=false
          </extraJvmArgs>
          <module>org.drools.workbench.services.verifier.webworker.VerifierWebWorker</module>
          <logLevel>INFO</logLevel>
          <disableCastChecking>true</disableCastChecking>
          <compileSourcesArtifacts>

            <compileSourcesArtifact>org.drools:drools-workbench-models-guided-dtable</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.soup:kie-soup-commons</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-commons</compileSourcesArtifact>

            <compileSourcesArtifact>org.drools:drools-verifier-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.drools:drools-verifier-core</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.workbench.services:kie-wb-common-verifier-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.drools:drools-wb-verifier-guided-decision-table-adapter</compileSourcesArtifact>
            <compileSourcesArtifact>org.drools:drools-wb-verifier-webworker</compileSourcesArtifact>
          </compileSourcesArtifacts>
        </configuration>
        <executions>
          <execution>
            <id>gwt-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
          <execution>
            <id>gwt-compile</id>
            <goals>
              <!-- Do not use 'resources' goal as it does not play well with filtered resources. -->
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
