<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.drools</groupId>
    <artifactId>drools</artifactId>
    <version>5.2.0.M1</version>
  </parent>
  <artifactId>drools-guvnor</artifactId>
  <packaging>war</packaging>
  <name>Drools :: Guvnor</name>
  <build>
    <finalName>drools-guvnor</finalName>
    <plugins>
      <plugin>
        <!--use -Dgwt.compiler.skip=true to skip GWT compiler-->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>2.1-20101001.MGWT219</version>
        <configuration>
          <!-- The default profile needs to be fast, so we only build 1 permutation { -->
          <module>org.drools.guvnor.FastCompiledGuvnor</module>
          <draftCompile>true</draftCompile>
          <!-- } -->
          <runTarget>org.drools.guvnor.Guvnor/Guvnor.html</runTarget>
          <compileSourcesArtifacts>
            <compileSourcesArtifact>org.drools:drools-factconstraint</compileSourcesArtifact>
            <compileSourcesArtifact>org.drools:drools-ide-common</compileSourcesArtifact>
          </compileSourcesArtifacts>
          <localWorkers>2</localWorkers><!-- Using all workers can temporarily hang te mouse and isn't much faster -->
          <extraJvmArgs>-Xmx512m</extraJvmArgs>
          <soyc>false</soyc><!-- Otherwise extra dir 2GB, which is too big for hudson builds -->
        </configuration>
        <dependencies>
          <!-- Explicitly declare gwt dependencies to ensure the use of the same GWT version. -->
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
          </dependency>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
          </dependency>
          <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>clean repository</id>
            <phase>clean</phase>
            <configuration>
              <tasks>
                <delete dir="repository"/>
                <delete file="repository.xml"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/src/main/webapp</directory>
            </resource>
            <resource>
              <directory>${basedir}/src/main/filtered-webapp</directory>
              <filtering>true</filtering>
            </resource>
          </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>fullProfile</id>
      <activation>
        <property>
          <name>full</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin><!-- Keep in sync with soa profile -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <!-- Build all GWT permutations and optimize them -->
              <module>org.drools.guvnor.Guvnor</module>
              <draftCompile>false</draftCompile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>soaProfile</id>
      <activation>
        <property>
          <name>soa</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin><!-- Keep in sync with full profile -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <!-- Build all GWT permutations and optimize them -->
              <module>org.drools.guvnor.Guvnor</module>
              <draftCompile>false</draftCompile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <!-- Internal dependencies -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-repository</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bpmn2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-decisiontables</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-templates</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-verifier</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-factconstraint</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-ide-common</artifactId>
    </dependency>
    <dependency>
      <groupId>wsdl4j</groupId>
      <artifactId>wsdl4j</artifactId>
    </dependency>

    <dependency>
      <groupId>net.sf.webdav-servlet</groupId>
      <artifactId>webdav-servlet</artifactId>
    </dependency>
    <!-- External dependencies -->
    <!-- now the deps for the web app -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>pl.balon.gwt</groupId>
      <artifactId>gwt-diagrams</artifactId>
    </dependency>
    <dependency>
      <groupId>org.cobogw.gwt</groupId>
      <artifactId>cobogw</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-servlet</artifactId>
    </dependency>
    <dependency><!-- Not needed at runtime, only at compile time, should be a dependency on gwt-maven-plugin -->
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.gwtext</groupId>
      <artifactId>gwtext</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
    </dependency>
    <!-- seam follows -->
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-remoting</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>ejb-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javassist</groupId>
      <artifactId>javassist</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>el-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>el-ri</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- Only needed by Tomcat deployment. Should include this lib through a Tomcat profile instead -->
    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
    </dependency>
    <!-- Only needed by Tomcat deployment. Should include this lib through a Tomcat profile instead -->
    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
    </dependency>
    <!-- Only needed by Tomcat deployment. Should include this lib through a Tomcat profile instead -->
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
    </dependency>
    <!-- Only needed by Tomcat deployment. Should include this lib through a Tomcat profile instead -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
    </dependency>
    <!-- NOT needed due to licencing -->
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-embedded</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
