<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright 2012 JBoss Inc ~ ~ 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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jbpm</groupId>
    <artifactId>jbpm-console-ng</artifactId>
    <version>6.0.0.Alpha9</version>
  </parent>
  <groupId>org.jbpm</groupId>
  <artifactId>jbpm-console-ng-showcase</artifactId>
  <packaging>war</packaging>

  <name>jBPM Console NG - Showcase</name>
  <description>jBPM Console NG - Showcase</description>

  <dependencies>
    <!-- jBPM Console Panels -->
    <!--Logs -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <!-- This is a war file, so logback is not in scope test, but in scope 
      compile -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-human-tasks-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-human-tasks-backend</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>jboss-transaction-api_1.1_spec</artifactId>
          <groupId>org.jboss.spec.javax.transaction</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-business-domain-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-business-domain-backend</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-process-runtime-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-process-runtime-backend</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-executor-service-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-executor-service-backend</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-bpm-home-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-console-ng-process-modeling-client</artifactId>
      <version>${project.version}</version>
    </dependency>


    <!-- UberFire -->
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-server</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-security-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-security-server</artifactId>
    </dependency>

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

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-core-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-core-backend</artifactId>
    </dependency>

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

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

    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.kie.commons</groupId>
      <artifactId>kie-nio2-jgit</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.commons</groupId>
      <artifactId>kie-nio2-fs</artifactId>
    </dependency>
     <dependency>
      <groupId>org.kie.commons</groupId>
      <artifactId>kie-commons-io</artifactId>
    </dependency>
    
    <dependency>
      <groupId>org.kie.commons</groupId>
      <artifactId>kie-commons-data</artifactId>
    </dependency>
    

    <!-- Errai Core -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
    </dependency>

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

    <!-- CDI Integration Modules -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-client</artifactId>
    </dependency>

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

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

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-cdi-jetty</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ui</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-data-binding</artifactId>
    </dependency>

    <dependency>
      <groupId>com.github.gwtbootstrap</groupId>
      <artifactId>gwt-bootstrap</artifactId>
    </dependency>

    <!-- CDI Development Utils -->
    <!-- This must be placed above com.google.gwt:gwt-dev to override the 
      Jetty that is present there -->
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
    </dependency>

    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-plus</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>geronimo-spec-jta</artifactId>
          <groupId>geronimo-spec</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-naming</artifactId>
    </dependency>

    <!-- Weld Modules -->
    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.weld.servlet</groupId>
      <artifactId>weld-servlet-core</artifactId>
    </dependency>

    <!-- GWT and GWT Extensions -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Rouge imports to avoid OSGi errors -->
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.osgi.core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-xjc</artifactId>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
    </dependency>

    <!-- jBPM Designer -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-designer-client</artifactId>
      <version>6.0.0.Alpha9</version>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-designer-api</artifactId>
      <version>6.0.0.Alpha9</version>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-designer-backend</artifactId>
      <version>6.0.0.Alpha9</version>
    </dependency>

    <dependency>
      <groupId>org.opensymphony.quartz</groupId>
      <artifactId>quartz</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-commons-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-core-services-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-core-services-backend</artifactId>
    </dependency>
    
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-project-editor-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-project-editor-backend</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-m2repo-editor-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-m2repo-editor-backend</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>ant</artifactId>
          <groupId>org.apache.ant</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-metadata-widget</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-config-resource-widget</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-commons-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-project-config-editor-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-project-config-editor-backend</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-project-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-view-source-widget</artifactId>
    </dependency>
     <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-decorated-grid-widget</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-commons-services-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-commons-builder</artifactId>
    </dependency>
     <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-explorer-backend</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.guvnor</groupId>
      <artifactId>guvnor-explorer-client</artifactId>
    </dependency>
     <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-guvnor-models-commons</artifactId>
    </dependency>
  </dependencies>

  <build>

    <resources>
      <!-- Include src/main/java in order not to break the Eclipse GWT plug-in -->
      <resource>
        <directory>src/main/java</directory>
      </resource>
      <!-- Include module descriptors from src/main/resources in order not 
        to break the Intellij GWT plug-in -->
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <module>org.jbpm.console.ng.FastCompiledjBPMShowcase</module>
          <logLevel>INFO</logLevel>
          <compileSourcesArtifacts>
            <compileSourcesArtifact>org.drools:drools-guvnor-models-commons</compileSourcesArtifact>
            
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-human-tasks-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-human-tasks-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-process-runtime-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-process-runtime-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-business-domain-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-business-domain-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-console-ng-process-modeling-client</compileSourcesArtifact>

            <compileSourcesArtifact>org.kie.guvnor:guvnor-decorated-grid-widget</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-view-source-widget</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-common-ui</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-commons-security</compileSourcesArtifact> 
            <compileSourcesArtifact>org.kie.guvnor:guvnor-commons-services-api</compileSourcesArtifact>  
            <compileSourcesArtifact>org.kie.guvnor:guvnor-metadata-widget</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-config-resource-widget</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-core-services-api</compileSourcesArtifact>
            
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-editor-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-editor-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-config-editor-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-project-config-editor-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-m2repo-editor-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-m2repo-editor-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-explorer-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.kie.guvnor:guvnor-explorer-client</compileSourcesArtifact>
            
            
            <compileSourcesArtifact>org.uberfire:uberfire-security-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-security-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-widgets-core-client</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-widgets-commons</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-workbench</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-backend-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.uberfire:uberfire-backend-commons</compileSourcesArtifact>

            <compileSourcesArtifact>org.jbpm:jbpm-designer-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.jbpm:jbpm-designer-client</compileSourcesArtifact>

            <compileSourcesArtifact>org.kie.commons:kie-nio2-model</compileSourcesArtifact>
          </compileSourcesArtifacts>
          <runTarget>org.jbpm.console.ng.jBPMShowcase/jBPM.html</runTarget>
          <extraJvmArgs>-Xmx1024m -XX:MaxPermSize=256m</extraJvmArgs>
          <soyc>false</soyc>
          
          <server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>
          <!-- drools-compiler has dependency on org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile, 
            see http://code.google.com/p/google-web-toolkit/issues/detail?id=4479 -->
          <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
        </configuration>
        <executions>
          <execution>
            <id>gwt-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
          <execution>
            <id>gwt-compile</id>
            <goals>
              <goal>resources</goal>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <packagingExcludes>**/javax/**/*.*,**/client/**/*.class</packagingExcludes>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>

      <!-- Tests are skipped by default because they require additional GWT 
        dependencies. Run mvn with -Pintegration-test to enable testing. -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jboss.errai</groupId>
        <artifactId>jacoco-gwt-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>jacoco-gwt-prepare-agent</id>
            <phase>initialize</phase>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-gwt-report</id>
            <phase>site</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}</directory>
              <includes>
                <include>.errai/**</include>
                <include>.niogit/**</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
    <!-- disabled as it cause problems in eclipse with m2eclipse support 
      <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> 
      <artifactId>lifecycle-mapping</artifactId> <configuration> <lifecycleMappingMetadata> 
      <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> 
      <artifactId>gwt-maven-plugin</artifactId> <versionRange>[2.3.0,)</versionRange> 
      <goals> <goal>resources</goal> </goals> </pluginExecutionFilter> <action> 
      <execute/> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> 
      <groupId>org.jboss.errai</groupId> <artifactId>jacoco-gwt-maven-plugin</artifactId> 
      <versionRange>[0.0,)</versionRange> <goals> <goal>prepare-agent</goal> </goals> 
      </pluginExecutionFilter> <action> <ignore/> </action> </pluginExecution> 
      </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> 
      </plugins> </pluginManagement> -->
  </build>

  <profiles>
    <profile>
      <id>fullProfile</id>
      <activation>
        <property>
          <name>full</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.ant</groupId>
          <artifactId>ant</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      <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.jbpm.console.ng.jBPMShowcase</module>
              <draftCompile>false</draftCompile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
