<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.apiman</groupId>
    <artifactId>apiman-dt-ui</artifactId>
    <version>1.0.0.Alpha2</version>
  </parent>
  <artifactId>apiman-dt-ui-war</artifactId>
  <packaging>war</packaging>
  <name>apiman-dt-ui-war</name>

  <dependencies>
    <!-- Project Dependencies -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-dt-api-beans</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-dt-api-rest</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-rt-engine-policies</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Overlord Commons -->
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-config</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>org.apache.felix.scr.annotations</artifactId>
          <groupId>org.apache.felix</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-uiheader</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-gwt</artifactId>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-i18n</artifactId>
    </dependency>

    <!-- Third Party Dependencies -->
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
    <dependency>
      <artifactId>slf4j-log4j12</artifactId>
      <groupId>org.slf4j</groupId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Errai -->
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ui</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-navigation</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-data-binding</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-jaxrs-client</artifactId>
      <scope>provided</scope>
    </dependency>

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

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

  </dependencies>

  <properties>
    <timestamp>${maven.build.timestamp}</timestamp>
  </properties>

  <build>
    <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>src/main/resources-filtered</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <attachClasses>true</attachClasses>
          <classesClassifier>classes</classesClassifier>
          <outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
          <packagingExcludes>
            **/*.java,
            **/.errai/**/*.*,
            **/javax/**/*.*,
            **/client/local/**/*.class,
            **/rebel.xml,
            **/ServerMarshallingFactoryImpl*
          </packagingExcludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*GwtTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <logLevel>INFO</logLevel>
          <strict>true</strict>
          <localWorkers>2</localWorkers>
          <runTarget>index.html</runTarget>
          <extraJvmArgs>-Xmx512m</extraJvmArgs>
          <soyc>false</soyc>
          <hostedWebapp>src/main/webapp/</hostedWebapp>
          <server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>
          <extraJvmArgs>-Xmx512m -Derrai.devel.debugCacheDir=${project.build.outputDirectory}/.errai -Derrai.marshalling.server.classOutput=${project.build.outputDirectory}</extraJvmArgs>
        </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>
    </plugins>
  </build>
</project>
