<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.vaadin</groupId>
    <artifactId>flow-project</artifactId>
    <version>2.2.1</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>flow-client</artifactId>
  <version>2.2.1</version>
  <name>Flow Client</name>
  <url>https://vaadin.com/flow-client</url>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <gwt.sdm.bindAddress>0.0.0.0</gwt.sdm.bindAddress>
    <gwt.module.style>OBF</gwt.module.style>
    <gwt.module>com.vaadin.ClientEngine</gwt.module>
    <gwt.module.output>${project.build.outputDirectory}/META-INF/resources/VAADIN/static/</gwt.module.output>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt</artifactId>
        <version>${gwt.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-server</artifactId>
      <version>2.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-osgi</artifactId>
      <version>2.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>2.8.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>2.8.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-elemental</artifactId>
      <version>2.8.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
      <version>5.0.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>6.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.cmpn</artifactId>
      <version>6.0.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>../flow-server/src/main/java</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <includes>
            <include>com/vaadin/flow/client/osgi/*</include>
            <include>META-INF/**</include>
            <include>OSGI-INF/**</include>
          </includes>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <index>false</index>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
        <configuration>
          <excludes>
            <exclude>**/Gwt*.java</exclude>
          </excludes>
          <enableAssertions>true</enableAssertions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>test</goal>
              <goal>generateAsync</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <enableAssertions>true</enableAssertions>
          <failOnError>true</failOnError>
          <gwtSdkFirstInClasspath></gwtSdkFirstInClasspath>
          <persistentunitcache>false</persistentunitcache>
          <webappDirectory>${gwt.module.output}</webappDirectory>
          <launcherDir>${gwt.module.output}</launcherDir>
          <compileReport>true</compileReport>
          <bindAddress>${gwt.sdm.bindAddress}</bindAddress>
          <modules>
            <module>${gwt.module}</module>
          </modules>
          <webMode>true</webMode>
          <style>${gwt.module.style}</style>
          <htmlunit>FF38</htmlunit>
          <testTimeOut>300</testTimeOut>
          <extraJvmArgs>-Xmx512m -Dvaadin.enableDevServer=false</extraJvmArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.ryanholdren</groupId>
        <artifactId>resourcecompressor</artifactId>
        <version>2017-06-24</version>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>compress</goal>
            </goals>
            <configuration>
              <directory>${gwt.module.output}/client/</directory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <id>add-gwt-test-sources-as-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/test-gwt/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
