<?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.stylesheet-cascade-layer-SNAPSHOT</version>
  </parent>
  <artifactId>flow-server</artifactId>
  <packaging>jar</packaging>
  <name>Flow Server</name>
  <description>${project.name}</description>

  <dependencies>

    <!-- Project dependencies -->
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-push</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jspecify</groupId>
      <artifactId>jspecify</artifactId>
    </dependency>

    <!-- DefaultApplicationConfigurationFactory is declared as an OSGi
            service -->

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.cmpn</artifactId>
      <version>${osgi.compendium.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.core</artifactId>
      <version>${osgi.core.version}</version>
      <scope>provided</scope>
    </dependency>

    <!-- API DEPENDENCIES -->

    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <!-- Needed for security annotations -->
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Library dependencies -->
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>license-checker</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.28.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>tools.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
      <groupId>tools.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>

    <!-- Jsoup for BootstrapHandler, Template, ... -->
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <version>${jsoup.version}</version>
    </dependency>
    <!-- Small reflection library -->
    <dependency>
      <groupId>com.vaadin.external</groupId>
      <artifactId>gentyref</artifactId>
      <version>1.2.0.vaadin1</version>
    </dependency>

    <!-- TESTING DEPENDENCIES -->
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-test-generic</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>2.7.4</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Used for verifying the detection of Kotlin applications -->
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>2.4.20</version>
      <scope>test</scope>
    </dependency>

    <!-- Bean Validation implementation -->
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>${hibernate.validator.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/version.properties</include>
        </includes>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/version.properties</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <index>false</index>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <configuration>
          <enableGeneration>true</enableGeneration>
          <includeProjectArtifact>true</includeProjectArtifact>
          <excludedArtifactIds>
            <excludedArtifactId>httpclient</excludedArtifactId>
            <excludedArtifactId>httpcore</excludedArtifactId>
          </excludedArtifactIds>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <typescript>
            <excludes>
              <exclude>src/main/resources/vite.generated.ts</exclude>
              <exclude>src/main/resources/com/vaadin/flow/server/webcomponent/webcomponent-*.js</exclude>
              <exclude>src/main/resources/com/vaadin/flow/server/BootstrapHandler.js</exclude>
            </excludes>
          </typescript>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
