<?xml version="1.0" encoding="UTF-8"?>
<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>com.vaadin</groupId>
    <artifactId>flow-project</artifactId>
    <version>25.4.pr-snapshot-builds-SNAPSHOT</version>
  </parent>
  <artifactId>flow-polymer2lit</artifactId>
  <packaging>jar</packaging>
  <name>Polymer to Lit converter</name>
  <description>${project.name}</description>

  <properties>
    <version.roaster>2.31.1.Final</version.roaster>
    <flow.apicmp.skip>true</flow.apicmp.skip>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-server</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-build-tools</artifactId>
      <version>${project.version}</version>
      <classifier>shaded</classifier>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.15.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.forge.roaster</groupId>
      <artifactId>roaster-api</artifactId>
      <version>${version.roaster}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.forge.roaster</groupId>
      <artifactId>roaster-jdt</artifactId>
      <version>${version.roaster}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-test-generic</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <typescript>
            <excludes>
              <exclude>src/main/resources/META-INF/frontend/generated/**</exclude>
              <exclude>src/test/resources/frontend/**</exclude>
            </excludes>
          </typescript>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.6.3</version>
        <executions>
          <execution>
            <id>npm-install</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <executable>npm</executable>
              <arguments>
                <argument>install</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>converter-compile</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <executable>npm</executable>
              <arguments>
                <argument>run</argument>
                <argument>compile</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
