<?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.8.0.Final</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

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

    <name>Drools Workbench - Verifier Backend</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.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-workbench-models-guided-dtable</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.drools</groupId>
                    <artifactId>drools-compiler</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-wb-verifier-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-wb-verifier-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-wb-verifier-core</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.uberfire</groupId>
            <artifactId>uberfire-commons</artifactId>
        </dependency>

        <dependency>
            <groupId>org.kie.soup</groupId>
            <artifactId>kie-soup-commons</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>com.google.gwt.gwtmockito</groupId>
            <artifactId>gwtmockito</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <plugins>
            <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-wb-verifier-api</compileSourcesArtifact>
                        <compileSourcesArtifact>org.drools:drools-wb-verifier-core</compileSourcesArtifact>
                        <compileSourcesArtifact>org.drools:drools-wb-verifier-client</compileSourcesArtifact>
                        <compileSourcesArtifact>org.drools:drools-wb-verifier-backend</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>
