<?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>vaadin-parent</artifactId>
    <version>3.0.3</version>
  </parent>

  <artifactId>flow-project</artifactId>
  <version>25.4.pr-snapshot-builds-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>Flow</name>
  <url>https://vaadin.com/flow</url>
  <inceptionYear>2000</inceptionYear>

  <organization>
    <name>Vaadin Ltd</name>
    <url>https://vaadin.com</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>flow</module>
    <module>flow-build-tools</module>
    <module>flow-server</module>
    <module>flow-react</module>
    <module>flow-polymer-template</module>
    <module>flow-lit-template</module>
    <module>flow-push</module>
    <module>flow-webpush</module>
    <module>flow-data</module>
    <module>flow-client</module>
    <module>flow-html-components</module>
    <module>flow-html-components-testbench</module>
    <module>flow-dnd</module>
    <module>flow-test-util</module>
    <module>flow-server-production-mode</module>
    <module>flow-plugins</module>
    <module>flow-test-generic</module>
    <module>flow-bom</module>
    <module>flow-devloop-daemon</module>
    <module>vaadin-dev-server</module>
    <module>flow-jandex</module>
    <module>vaadin-spring</module>
    <module>flow-polymer2lit</module>
  </modules>
  <scm>
    <connection>scm:https:https://github.com/vaadin/flow.git</connection>
    <developerConnection>scm:git:git@github.com:vaadin/flow.git</developerConnection>
    <url>https://github.com/vaadin/flow</url>
  </scm>

  <properties>
    <flow.release.repo.id>vaadin-prereleases</flow.release.repo.id>
    <flow.release.repo.url>https://maven.vaadin.com/vaadin-prereleases/</flow.release.repo.url>

    <flow.addons.repo.id>vaadin-addons</flow.addons.repo.id>
    <flow.addons.repo.url>https://maven.vaadin.com/vaadin-addons</flow.addons.repo.url>

    <maven.compiler.release>21</maven.compiler.release>
    <maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
    <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <sonar.java.source>21</sonar.java.source>
    <sonar.issuesReport.console.enable>true</sonar.issuesReport.console.enable>
    <sonar.issuesReport.html.enable>true</sonar.issuesReport.html.enable>

    <!--
      The agentic workflow lock files are generated by `gh aw compile` and
      install their agent with a global npm install. S6505 asks for the
      ignore-scripts flag on those, which the Claude engine cannot use:
      @anthropic-ai/claude-code downloads its native binary from a
      postinstall script, and skipping it leaves a CLI that exits with
      "claude native binary not installed". The flag is also not ours to
      add, since editing a generated file is undone by the next compile.
      Scoped to this one rule, so the lock files keep being analyzed for
      everything else.
    -->
    <sonar.issue.ignore.multicriteria>agenticInstallScripts</sonar.issue.ignore.multicriteria>
    <sonar.issue.ignore.multicriteria.agenticInstallScripts.ruleKey>githubactions:S6505</sonar.issue.ignore.multicriteria.agenticInstallScripts.ruleKey>
    <sonar.issue.ignore.multicriteria.agenticInstallScripts.resourceKey>**/.github/workflows/*.lock.yml</sonar.issue.ignore.multicriteria.agenticInstallScripts.resourceKey>

    <maven.javadoc.skip>true</maven.javadoc.skip>
    <failOnMissingWebXml>false</failOnMissingWebXml>

    <!--
      Ensures modules that do not declare this POM as parent
      (like flow-bom) are updated as well when using versions:set
      to change the project version
    -->
    <processAllModules>true</processAllModules>

    <!-- Dependencies -->
    <spring.boot.version>4.1.1</spring.boot.version>
    <jakarta.ee.version>11.0.0</jakarta.ee.version>
    <gwt.version>2.9.0</gwt.version>
    <hibernate.validator.version>9.1.3.Final</hibernate.validator.version>
    <slf4j.version>2.0.19</slf4j.version>
    <polymer.version>2.6.1</polymer.version>
    <jackson.version>3.1.5</jackson.version>
    <jaxb.version>4.0.9</jaxb.version>
    <guava.version>33.7.1-jre</guava.version>
    <javassist.version>3.30.2-GA</javassist.version>
    <junit.jupiter.version>6.1.3</junit.jupiter.version>

    <!-- Plugins -->
    <frontend.maven.plugin.version>1.5</frontend.maven.plugin.version>
    <maven.surefire.plugin.version>3.6.0</maven.surefire.plugin.version>
    <jacoco.plugin.version>0.8.15</jacoco.plugin.version>
    <maven.failsafe.plugin.version>3.5.6</maven.failsafe.plugin.version>
    <maven.war.plugin.version>3.5.1</maven.war.plugin.version>
    <maven.jar.plugin.version>3.5.1</maven.jar.plugin.version>
    <maven.resources.plugin.version>3.0.2</maven.resources.plugin.version>
    <maven.clean.plugin.version>3.5.0</maven.clean.plugin.version>
    <maven.exec.plugin.version>3.6.3</maven.exec.plugin.version>
    <!-- Maven 3.8 still binds install:2.4 by default, which corrupts local
         repository metadata when modules install in parallel (-T). -->
    <maven.install.plugin.version>3.1.4</maven.install.plugin.version>
    <testbench.version>25.3.0-beta1</testbench.version>
    <jetty.version>12.1.13</jetty.version>
    <properties-maven-plugin.version>1.3.0</properties-maven-plugin.version>
    <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
    <maven.version>3.9.16</maven.version>
    <maven-plugin-annotations.version>3.15.2</maven-plugin-annotations.version>
    <spotless.plugin.version>3.10.2</spotless.plugin.version>
    <spotless.license-header>${maven.multiModuleProjectDirectory}/eclipse/apache2-license-header.txt</spotless.license-header>
    <spotless.ratchetFrom/>

    <!-- Frontend -->
    <flow.dev.dependencies.folder>generatedDeps</flow.dev.dependencies.folder>
    <flow.dev.dependencies.file>devDependencies.json</flow.dev.dependencies.file>

    <!-- Used in OSGi manifests -->
    <jsoup.version>1.23.2</jsoup.version>
    <!-- Note that this should be kept in sync with the class Constants -->
    <atmosphere.runtime.version>3.0.5.slf4jvaadin1</atmosphere.runtime.version>
    <atmosphere.client.version>4.0.1</atmosphere.client.version>

    <!-- OSGi -->
    <!-- Note: the parserVersion value is set by build-helper-maven-plugin -->
    <osgi.bundle.version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</osgi.bundle.version>
    <bnd.version>7.4.0</bnd.version>
    <osgi.core.version>7.0.0</osgi.core.version>
    <osgi.compendium.version>7.0.0</osgi.compendium.version>
    <osgi.annotation.version>8.1.0</osgi.annotation.version>

    <maven.test.skip>false</maven.test.skip>

    <!-- This property is needed to allow some Win-specific unit tests -->
    <!-- to be disabled via system property in CI until they got fixed -->
    <exclude.windows.failed.tests/>

    <!-- Extra JVM arguments for surefire forks; modules override this
         when their tests need e.g. add-opens flags. The empty default
         keeps the argLine expression resolvable everywhere. -->
    <surefire.argLine/>
    <!-- Populated by jacoco:prepare-agent when the coverage profile is
         active. Late-bound into the surefire argLine via @{...} so the
         agent set at execution time is picked up. -->
    <jacoco.agent.argLine/>

    <!-- Skip these categories in validation, use -Pslow-tests to run them
            and override slow-tests profile to add more categories -->
    <excludedGroups>com.vaadin.flow.testcategory.SlowTests</excludedGroups>
    <failsafe.parallel>all</failsafe.parallel>
    <failsafe.threadCount>2</failsafe.threadCount>
    <failsafe.perCoreThreadCount>true</failsafe.perCoreThreadCount>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>tools.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <!-- Use the latest version -->
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-bom</artifactId>
        <version>${jakarta.ee.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-elemental</artifactId>
        <version>${gwt.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.22.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.20.0</version>
      </dependency>

      <dependency>
        <groupId>org.jspecify</groupId>
        <artifactId>jspecify</artifactId>
        <version>1.0.1</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy</artifactId>
        <version>1.18.13</version>
      </dependency>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>9.10.1</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>license-checker</artifactId>
        <version>3.1.2</version>
      </dependency>

      <!-- Test dependencies -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${junit.jupiter.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.jupiter.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>${junit.jupiter.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-launcher</artifactId>
        <version>${junit.jupiter.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.23.0</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-inline</artifactId>
        <version>5.2.0</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>4.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.lucee</groupId>
        <artifactId>jcip-annotations</artifactId>
        <version>1.0.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.lucee</groupId>
      <artifactId>jcip-annotations</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <repositories>
    <!-- The order of definitions matters. Explicitly defining central
            here to make sure it has the highest priority. -->
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>${flow.release.repo.id}</id>
      <url>${flow.release.repo.url}</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>${flow.addons.repo.id}</id>
      <url>${flow.addons.repo.url}</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <!-- The order of definitions matters. Explicitly defining central
            here to make sure it has the highest priority. -->
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>${flow.release.repo.id}</id>
      <url>${flow.release.repo.url}</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build-helper-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.karaf.tooling</groupId>
          <artifactId>karaf-maven-plugin</artifactId>
          <version>4.3.9</version>
          <extensions>true</extensions>
          <executions>
            <execution>
              <id>generate-features-file</id>
              <goals>
                <goal>features-generate-descriptor</goal>
              </goals>
              <phase>generate-resources</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.6.3</version>
          <dependencies>
            <dependency>
              <groupId>de.skuzzle.enforcer</groupId>
              <artifactId>restrict-imports-enforcer-rule</artifactId>
              <version>3.0.2</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check-logging-imports</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <phase>process-sources</phase>
              <configuration>
                <rules>
                  <RestrictImports>
                    <reason>Use SLF4j for logging</reason>
                    <bannedImport>java.util.logging.**</bannedImport>
                  </RestrictImports>
                </rules>
              </configuration>
            </execution>
            <execution>
              <id>default-cli</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <dependencyConvergence>
                    <excludes>
                      <!-- Spring Boot brings in jspecify 1.0.1 while Selenium
                           and JUnit still depend on 1.0.0. The releases differ
                           only in documentation, so the split is harmless.
                           Remove once the transitive dependencies have caught
                           up. -->
                      <exclude>org.jspecify:jspecify</exclude>
                    </excludes>
                  </dependencyConvergence>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven.jar.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven.install.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven.war.plugin.version}</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Implementation-Title>${project.name}</Implementation-Title>
                <Implementation-Version>${project.version}</Implementation-Version>
              </manifestEntries>
            </archive>
            <packagingExcludes>%regex[WEB-INF/lib/flow-build-tools-.*(?&lt;!-shaded)\.jar]</packagingExcludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.plugin.version}</version>
          <configuration>
            <trimStackTrace>false</trimStackTrace>
            <excludes>
              <exclude>${exclude.windows.failed.tests}</exclude>
            </excludes>
            <argLine>@{jacoco.agent.argLine} ${surefire.argLine}</argLine>
            <enableAssertions>true</enableAssertions>
            <classpathDependencyExcludes>
              <classpathDependencyExclude>org.osgi:org.osgi.core</classpathDependencyExclude>
            </classpathDependencyExcludes>
            <!--
                        <parallel>classes</parallel>
                        <threadCount>4</threadCount>
-->
            <failIfNoTests>false</failIfNoTests>
            <systemPropertyVariables>
              <maven.home>${maven.home}</maven.home>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.failsafe.plugin.version}</version>
          <configuration>
            <argLine>${failsafe.argLine}</argLine>
            <trimStackTrace>false</trimStackTrace>
            <enableAssertions>true</enableAssertions>
            <parallel>${failsafe.parallel}</parallel>
            <threadCount>${failsafe.threadCount}</threadCount>
            <perCoreThreadCount>${failsafe.perCoreThreadCount}</perCoreThreadCount>
            <!-- export test server port to integration tests -->
            <systemPropertyVariables>
              <serverPort>${server.port}</serverPort>
            </systemPropertyVariables>
            <excludes>
              <exclude>**/*$*</exclude>
              <exclude>${exclude.it.tests}</exclude>
              <exclude>${exclude.windows.failed.it.tests}</exclude>
            </excludes>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.sun.xml.bind</groupId>
              <artifactId>jaxb-impl</artifactId>
              <version>${jaxb.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.siom79.japicmp</groupId>
          <artifactId>japicmp-maven-plugin</artifactId>
          <dependencies>
            <dependency>
              <groupId>javax.activation</groupId>
              <artifactId>javax.activation-api</artifactId>
              <version>1.2.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse
                    m2e settings only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.commonjava.maven.plugins</groupId>
                    <artifactId>directory-maven-plugin</artifactId>
                    <versionRange>[0.1,)</versionRange>
                    <goals>
                      <goal>highest-basedir</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <versionRange>[3.2,)</versionRange>
                    <goals>
                      <goal>descriptor</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.7.1</version>
          <configuration>
            <!-- Default is system -->
            <excludedScopes>system,test</excludedScopes>
            <!-- Workaround for https://github.com/mojohaus/license-maven-plugin/issues/511:
                 2.7.1 default AUTODETECT fails on a clean target dir where licenses.xml does not yet exist. -->
            <licensesOutputFileEol>LF</licensesOutputFileEol>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.5.0</version>
          <configuration>
            <propertiesEncoding>UTF-8</propertiesEncoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>5.7.0.6970</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.plugin.version}</version>
        <configuration>
          <ratchetFrom>${spotless.ratchetFrom}</ratchetFrom>
          <java>
            <eclipse>
              <file>${maven.multiModuleProjectDirectory}/eclipse/VaadinJavaConventions.xml</file>
            </eclipse>
            <endWithNewline/>
            <removeUnusedImports/>
            <importOrder>
              <file>${maven.multiModuleProjectDirectory}/eclipse/flow.importorder</file>
            </importOrder>
            <forbidWildcardImports/>
            <licenseHeader>
              <file>${spotless.license-header}</file>
            </licenseHeader>
          </java>
          <typescript>
            <includes>
              <include>src/**/*.js</include>
              <include>src/**/*.ts</include>
              <include>frontend/**/*.js</include>
              <include>frontend/**/*.ts</include>
            </includes>
            <excludes>
              <exclude>src/main/frontend/generated/**</exclude>
            </excludes>
            <prettier>
              <configFile>${maven.multiModuleProjectDirectory}/.prettierrc</configFile>
              <npmInstallCache>${maven.multiModuleProjectDirectory}/target/.spotless-npm-install-cache</npmInstallCache>
            </prettier>
          </typescript>
          <css>
            <includes>
              <include>src/**/*.css</include>
              <include>frontend/**/*.css</include>
            </includes>
            <excludes>
              <exclude>src/main/frontend/generated/**</exclude>
            </excludes>
            <prettier>
              <configFile>${maven.multiModuleProjectDirectory}/.prettierrc</configFile>
              <npmInstallCache>${maven.multiModuleProjectDirectory}/target/.spotless-npm-install-cache</npmInstallCache>
            </prettier>
          </css>
          <pom>
            <sortPom>
              <expandEmptyElements>false</expandEmptyElements>
            </sortPom>
          </pom>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.16.0</version>
        <!-- Runs NullAway over every module. OnlyNullMarked means a module
             is checked exactly as far as its packages opt in with
             @NullMarked, so modules that have not opted in yet compile
             unchanged. -->
        <configuration>
          <compilerArgs>
            <arg>-XDcompilePolicy=simple</arg>
            <arg>-XDaddTypeAnnotationsToSymbol=true</arg>
            <arg>--should-stop=ifError=FLOW</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
            <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
            <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
            <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
            <arg>-Xplugin:ErrorProne -XepDisableAllChecks -Xep:NullAway:ERROR -XepOpt:NullAway:JSpecifyMode=true -XepOpt:NullAway:OnlyNullMarked=true</arg>
          </compilerArgs>
          <annotationProcessorPaths>
            <path>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>2.50.0</version>
            </path>
            <path>
              <groupId>com.uber.nullaway</groupId>
              <artifactId>nullaway</artifactId>
              <version>0.14.0</version>
            </path>
          </annotationProcessorPaths>
          <fork>true</fork>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <configuration>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.3</version>
      </plugin>

      <plugin>
        <groupId>org.commonjava.maven.plugins</groupId>
        <artifactId>directory-maven-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>set-root-dir-for-common-lifecycle</id>
            <goals>
              <goal>highest-basedir</goal>
            </goals>
            <phase>initialize</phase>
            <configuration>
              <property>project.rootdir</property>
            </configuration>
          </execution>
          <execution>
            <id>set-root-dir-for-clean-lifecycle</id>
            <goals>
              <goal>highest-basedir</goal>
            </goals>
            <phase>pre-clean</phase>
            <configuration>
              <property>project.rootdir</property>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>${maven.clean.plugin.version}</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${project.rootdir}/driver</directory>
            </fileset>
            <fileset>
              <directory>${project.rootdir}/driver_zips</directory>
            </fileset>
            <fileset>
              <directory>error-screenshots</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>parse-version</id>
            <goals>
              <goal>parse-version</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>biz.aQute.bnd</groupId>
        <artifactId>bnd-maven-plugin</artifactId>
        <version>${bnd.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>bnd-process</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
      <!-- Enabling the use of SSH for deployment -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>3.5.3</version>
      </extension>
    </extensions>
  </build>
  <profiles>
    <profile>
      <id>install-git-hooks</id>
      <activation>
        <property>
          <name>!env.CI</name>
        </property>
        <file>
          <missing>${maven.multiModuleProjectDirectory}/.husky/_</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${maven.exec.plugin.version}</version>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>install-git-hooks</id>
                <goals>
                  <goal>exec</goal>
                </goals>
                <phase>initialize</phase>
                <configuration>
                  <executable>node</executable>
                  <workingDirectory>${maven.multiModuleProjectDirectory}</workingDirectory>
                  <arguments>
                    <argument>${maven.multiModuleProjectDirectory}/scripts/installHusky.js</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>default</id>
      <activation>
        <property>
          <name>!release</name>
        </property>
      </activation>
      <modules>
        <module>flow-tests</module>
      </modules>
    </profile>

    <profile>
      <id>validation</id>
      <properties>
        <maven.javadoc.skip>false</maven.javadoc.skip>
      </properties>
    </profile>
    <profile>
      <id>all-tests</id>
      <properties>
        <groups/>
        <excludedGroups/>
      </properties>
    </profile>
    <profile>
      <id>slow-tests</id>
      <properties>
        <groups>com.vaadin.flow.testcategory.SlowTests</groups>
        <excludedGroups/>
      </properties>
    </profile>
    <profile>
      <!-- Collects unit test coverage with JaCoCo. The per-module XML
           reports (target/site/jacoco/jacoco.xml) are fed to Sonar via
           sonar.coverage.jacoco.xmlReportPaths. -->
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.plugin.version}</version>
            <executions>
              <execution>
                <id>prepare-jacoco-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <propertyName>jacoco.agent.argLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>jacoco-report</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <formats>
                    <format>XML</format>
                  </formats>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonar-cloud</id>
      <properties>
        <sonar.java.source>${maven.compiler.source}</sonar.java.source>
        <sonar.organization>vaadin</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <!-- override properties for legacy sonar instance -->
        <sonar.analysis.mode/>
        <sonar.issuesReport.console.enable/>
        <sonar.issuesReport.html.enable/>
      </properties>
    </profile>
    <profile>
      <id>apicmp</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.siom79.japicmp</groupId>
            <artifactId>japicmp-maven-plugin</artifactId>
            <version>${japicmp.maven.plugin.version}</version>
            <configuration>
              <oldVersion>
                <dependency>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${api.reference.version}</version>
                  <type>jar</type>
                </dependency>
              </oldVersion>
              <newVersion>
                <file>
                  <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
                </file>
              </newVersion>
              <parameter>
                <onlyModified>true</onlyModified>
                <ignoreMissingClasses>true</ignoreMissingClasses>
                <skipXmlReport>true</skipXmlReport>
                <skipDiffReport>true</skipDiffReport>
                <ignoreMissingOldVersion>true</ignoreMissingOldVersion>
              </parameter>
              <skip>${flow.apicmp.skip}</skip>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>cmp</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
