<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.overlord.sramp</groupId>
    <artifactId>s-ramp</artifactId>
    <version>0.6.0.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>s-ramp-ui-war</artifactId>
  <packaging>war</packaging>
  <name>S-RAMP UI: Web App</name>
  <dependencies>
    <!-- Project Dependencies -->
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-client</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javassist</artifactId>
          <groupId>javassist</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-java</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-switchyard</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-kie</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-teiid</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-rtgov</artifactId>
    </dependency>

    <!-- Overlord Commons -->
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-services</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-auth</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-config</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-uiheader</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-gwt</artifactId>
    </dependency>

    <!-- Third Party Dependencies -->
    <dependency>
      <groupId>org.picketbox</groupId>
      <artifactId>picketbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picketlink</groupId>
      <artifactId>picketlink-federation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.0_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
      <artifactId>jboss-jsp-api_2.2_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.ejb</groupId>
      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Errai -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-data-binding</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-navigation</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-tools</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mvel</groupId>
      <artifactId>mvel2</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-gwt</artifactId>
      <scope>provided</scope>
    </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>

    <!-- Weld -->
    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se-core</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>el-api</artifactId>
          <groupId>javax.el</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld.servlet</groupId>
      <artifactId>weld-servlet-core</artifactId>
    </dependency>

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

    <!-- Runtime / Container dependencies -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
  </dependencies>

  <build>
    <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <attachClasses>true</attachClasses>
          <classesClassifier>classes</classesClassifier>
          <warName>${project.artifactId}</warName>
          <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
          <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class,**/rebel.xml</packagingExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <logLevel>INFO</logLevel>
          <runTarget>index.html</runTarget>
          <extraJvmArgs>-Xmx512m</extraJvmArgs>
          <soyc>false</soyc>
          <strict>true</strict>
	  <localWorkers>2</localWorkers>
	  <failOnError>true</failOnError>
          <hostedWebapp>src/main/webapp/</hostedWebapp>
          <server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>
        </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>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <executions>
          <execution>
            <id>default-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}</directory>
                  <includes>
                    <include>www-test/**</include>
                    <include>.gwt/**</include>
                    <include>.errai/**</include>
                    <include>src/main/webapp/.errai/**</include>
                    <include>src/main/webapp/app/**</include>
                    <include>src/main/webapp/WEB-INF/deploy/**</include>
                    <include>src/main/webapp/WEB-INF/lib/**</include>
                    <include>src/main/webapp/WEB-INF/classes/**</include>
                    <include>**/gwt-unitCache/**</include>
                    <include>**/*.JUnit/**</include>
                  </includes>
                </fileset>
              </filesets>
            </configuration>
          </execution>
          <execution>
            <id>package-clean</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <excludeDefaultDirectories>true</excludeDefaultDirectories>
              <filesets>
                <fileset>
                  <directory>${basedir}</directory>
                  <includes>
                    <!-- Prevent non-needed GWT junk from ending up in the war. -->
                    <include>**/.junit_symbolMaps/**</include>
                  </includes>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
