<?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>observability-kit-tests</artifactId>
    <version>5.0.0-alpha1</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>observability-kit-tests-spring</artifactId>
  <version>5.0.0-alpha1</version>
  <packaging>war</packaging>
  <name>Test Vaadin Observability Kit on a plain-Spring (non-Boot) Jetty deployment</name>
  <description>Integration test that wires observability-kit-spring into a plain Spring MVC WAR
    (no Spring Boot) and verifies session / UI / request metrics are recorded.</description>
  <licenses>
    <license>
      <name>Vaadin Commercial License and Service Terms</name>
      <url>https://vaadin.com/commercial-license-and-service-terms</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>observability-kit-spring</artifactId>
      <version>5.0.0-alpha1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>7.0.7</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-core</artifactId>
      <version>1.16.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-server</artifactId>
      <version>25.3.0-alpha6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-client</artifactId>
      <version>25.3.0-alpha6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-html-components</artifactId>
      <version>25.3.0-alpha6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <defaultGoal>jetty:run</defaultGoal>
    <plugins>
      <plugin>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-maven-plugin</artifactId>
        <version>${flow.version}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>prepare-frontend</goal>
              <goal>build-frontend</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty.ee10</groupId>
        <artifactId>jetty-ee10-maven-plugin</artifactId>
        <version>12.1.8</version>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <stopPort>8090</stopPort>
          <stopKey>observability-kit-spring</stopKey>
          <stopWait>5</stopWait>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.3</version>
        <executions>
          <execution>
            <id>enforce-no-spring-boot</id>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>org.springframework.boot</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
