<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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>25.4-SNAPSHOT</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>flow-client</artifactId>
  <version>25.4-SNAPSHOT</version>
  <name>Flow Client</name>
  <description>${project.name}</description>
  <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>
    <jandex.skip>true</jandex.skip>
    <flow.apicmp.skip>true</flow.apicmp.skip>
    <skipTsTests>${skipTests}</skipTsTests>
  </properties>
  <build>
    <resources>
      <resource>
        <targetPath>META-INF/frontend</targetPath>
        <directory>src/main/frontend</directory>
        <includes>
          <include>*.js</include>
          <include>*.d.ts</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <includes>
            <include>META-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>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>npm-install</id>
            <phase>validate</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>npm</executable>
              <arguments>
                <argument>install</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>install-esbuild</id>
            <phase>validate</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>node</executable>
              <arguments>
                <argument>node_modules/esbuild/install.js</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>typescript-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>npm</executable>
              <arguments>
                <argument>run</argument>
                <argument>compile</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>run-tests</id>
            <phase>test</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>npm</executable>
              <arguments>
                <argument>test</argument>
              </arguments>
              <skip>${skipTsTests}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
