<?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>vaadin-parent</artifactId>
    <version>3.0.0</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-flow-components</artifactId>
  <version>25.1.1</version>
  <packaging>pom</packaging>
  <name>Vaadin Flow Components Root Project</name>
  <url>https://vaadin.com/components</url>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:https:https://github.com/vaadin/flow-components.git</connection>
    <developerConnection>scm:git:git@github.com:vaadin/flow-components.git</developerConnection>
    <url>https://github.com/vaadin/flow-components</url>
  </scm>
  <properties>
    <maven.compiler.release>21</maven.compiler.release>
    <spring-ai.version>2.0.0-M2</spring-ai.version>
    <spotless.plugin.version>3.2.1</spotless.plugin.version>
    <cvdlName></cvdlName>
    <jetty.version>12.1.2</jetty.version>
    <spotless.nodeExecutable></spotless.nodeExecutable>
    <flow.version>25.1.1</flow.version>
    <maven.resources.plugin.version>3.4.0</maven.resources.plugin.version>
    <langchain4j.version>1.12.2</langchain4j.version>
    <jetty.http.port>8080</jetty.http.port>
    <reactor-core.version>3.8.3</reactor-core.version>
    <surefire.argLine></surefire.argLine>
    <karaf-maven-plugin.version>4.4.10</karaf-maven-plugin.version>
    <spotless.licence-header>${maven.multiModuleProjectDirectory}/scripts/templates/apache2-license-header.txt</spotless.licence-header>
    <osgi.export.package>default</osgi.export.package>
    <poi.version>5.5.1</poi.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jakarta.servlet.api.version>6.1.0</jakarta.servlet.api.version>
    <maven.failsafe.plugin.version>3.5.5</maven.failsafe.plugin.version>
    <com.vaadin.tests.SharedBrowser.reuseBrowser>true</com.vaadin.tests.SharedBrowser.reuseBrowser>
    <javaparser.version>3.28.0</javaparser.version>
    <jetty.stop.port>9999</jetty.stop.port>
    <osgi.bundle.license>http://www.apache.org/licenses/LICENSE-2.0</osgi.bundle.license>
    <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <failIfNoTests>false</failIfNoTests>
    <failsafe.forkCount>4</failsafe.forkCount>
    <jakarta.web.api.version>11.0.0</jakarta.web.api.version>
    <checkstyle.version>13.2.0</checkstyle.version>
    <com.vaadin.testbench.Parameters.testsInParallel>1</com.vaadin.testbench.Parameters.testsInParallel>
    <spring-data-commons.version>4.0.3</spring-data-commons.version>
    <spotless.npmExecutable></spotless.npmExecutable>
    <maven.surefire.plugin.version>3.5.5</maven.surefire.plugin.version>
    <vaadin.pnpm.enable>false</vaadin.pnpm.enable>
    <testbench.version>10.1.0</testbench.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.github.javaparser</groupId>
        <artifactId>javaparser-core</artifactId>
        <version>${javaparser.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-bom</artifactId>
        <version>${flow.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-test-generic</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-test-util</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-lumo-theme</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench-core</artifactId>
        <version>${testbench.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench-shared</artifactId>
        <version>${testbench.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-web-api</artifactId>
        <version>${jakarta.web.api.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>${jakarta.servlet.api.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.20.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>6.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.cmpn</artifactId>
        <version>7.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>2.0.17</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.15.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.4.0</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.12.0</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <quiet>true</quiet>
            <doclint>none</doclint>
          </configuration>
        </plugin>
        <plugin>
          <groupId>biz.aQute.bnd</groupId>
          <artifactId>bnd-maven-plugin</artifactId>
          <version>7.2.1</version>
          <executions>
            <execution>
              <goals>
                <goal>bnd-process</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <bnd>// macro reference: https://bnd.bndtools.org/chapters/855-macros-ref.html

                          regexArtifactId: vaadin-(.*)-flow(-.*)?
                          replacementPattern: $1
                          packageNameWithDash: ${replacestring;${project.artifactId};${regexArtifactId};${replacementPattern}}

                          dash: -
                          packageNameWithoutDash: ${replacestring;${packageNameWithDash};${dash};}

                          packageNameTmp: ${replacestring;${packageNameWithoutDash};icons;icon}

                          isDemoPattern: .*-flow-demo
                          isDemo: ${matches;${project.artifactId};${isDemoPattern}}
                          packageName: ${packageNameTmp}${if;${isDemo};.demo}

                          exportPackageDefault: ${project.groupId}.flow.component.*${packageName}.*
                          isExportPackageDefault: ${is;${osgi.export.package};default}
                          exportPackage: ${if;${isExportPackageDefault};${exportPackageDefault};${osgi.export.package}}
                          symbolicNameDefault: ${project.groupId}.flow.component.${packageName}
                          symbolicName: ${if;${isExportPackageDefault};${symbolicNameDefault};${osgi.export.package}}

                          Bundle-Name: ${project.artifactId}
                          Bundle-SymbolicName: ${symbolicName}

                          Import-Package: *
                          Export-Package: ${exportPackage};-noimport:=true
                          Bundle-License: ${osgi.bundle.license}

                          CvdlName: ${cvdlName}
                          Implementation-Title: ${project.name}
                          Vaadin-Package-Version: 1
                  includeresource.resources: -src/main/resources

                          //if profile war is used in demos
                  fixupmessages: "Classes found in the wrong directory";is:=warning</bnd>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty.ee10</groupId>
          <artifactId>jetty-ee10-maven-plugin</artifactId>
          <version>${jetty.version}</version>
          <executions>
            <execution>
              <id>start-jetty</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>start-war</goal>
              </goals>
            </execution>
            <execution>
              <id>stop-jetty</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>stop</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <httpConnector>
              <port>${jetty.http.port}</port>
            </httpConnector>
            <stopPort>${jetty.stop.port}</stopPort>
            <stopWait>5</stopWait>
            <stopKey>foo</stopKey>
            <systemProperties>
              <force>true</force>
              <project.basedir>${project.basedir}</project.basedir>
              <vaadin.productionMode>false</vaadin.productionMode>
              <vaadin.reuseDevServer>true</vaadin.reuseDevServer>
              <vaadin.frontend.hotdeploy>true</vaadin.frontend.hotdeploy>
            </systemProperties>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire-junit4</artifactId>
              <version>${maven.surefire.plugin.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <argLine>${surefire.argLine}</argLine>
            <excludes>
              <exclude>${exclude.tests}</exclude>
            </excludes>
            <skip>${skipUnitTests}</skip>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven.checkstyle.plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
            <dependency>
              <groupId>com.vaadin</groupId>
              <artifactId>vaadin-flow-components-checkstyle-rules</artifactId>
              <version>${project.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>checkstyle/checkstyle.xml</configLocation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.failsafe.plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire-junit4</artifactId>
              <version>${maven.surefire.plugin.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <forkCount>${failsafe.forkCount}</forkCount>
            <argLine>-Xmx2048m</argLine>
            <reuseForks>false</reuseForks>
            <trimStackTrace>false</trimStackTrace>
            <systemPropertyVariables>
              <com.vaadin.tests.SharedBrowser.reuseBrowser>${com.vaadin.tests.SharedBrowser.reuseBrowser}</com.vaadin.tests.SharedBrowser.reuseBrowser>
              <com.vaadin.testbench.Parameters.testsInParallel>${com.vaadin.testbench.Parameters.testsInParallel}</com.vaadin.testbench.Parameters.testsInParallel>
            </systemPropertyVariables>
            <excludes>
              <exclude>${exclude.tests}</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources.plugin.version}</version>
          <executions>
            <execution>
              <id>copy-resources-for-demo-website</id>
              <phase>process-resources</phase>
              <goals>
                <goal>copy-resources</goal>
              </goals>
              <configuration>
                <outputDirectory>${project.build.directory}/test-classes</outputDirectory>
                <overwrite>true</overwrite>
                <resources>
                  <resource>
                    <directory>src/test/java</directory>
                  </resource>
                  <resource>
                    <directory>src/main/webapp</directory>
                    <targetPath>META-INF/resources</targetPath>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.vaadin</groupId>
          <artifactId>flow-maven-plugin</artifactId>
          <version>${flow.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-frontend</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <pnpmEnable>${vaadin.pnpm.enable}</pnpmEnable>
            <frontendDirectory>./frontend</frontendDirectory>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>1.3.0</version>
          <executions>
            <execution>
              <goals>
                <goal>set-system-properties</goal>
              </goals>
              <configuration>
                <properties>
                  <property>
                    <name>vaadin.devmode.liveReload.enabled</name>
                    <value>false</value>
                  </property>
                  <property>
                    <name>skipJetty</name>
                    <value>${skipTests}</value>
                  </property>
                </properties>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.5.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.8</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.6.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.5.0</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.7.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.plugin.version}</version>
        <configuration>
          <java>
            <eclipse>
              <file>${maven.multiModuleProjectDirectory}/eclipse/VaadinJavaConventions.xml</file>
            </eclipse>
            <excludes>
              <exclude>**/com/google/gwt/**/*.*</exclude>
            </excludes>
            <endWithNewline />
            <removeUnusedImports />
            <importOrder>
              <wildcardsLast>true</wildcardsLast>
              <order>java|javax,org,com</order>
            </importOrder>
            <licenseHeader>
              <file>${spotless.licence-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/**/SpreadsheetSingleScriptTemplate.js</exclude>
              <exclude>src/main/resources/META-INF/frontend/generated/**</exclude>
              <exclude>frontend/generated/**</exclude>
            </excludes>
            <prettier>
              <npmExecutable>${spotless.npmExecutable}</npmExecutable>
              <npmInstallCache>${maven.multiModuleProjectDirectory}/target/.spotless-npm-install-cache</npmInstallCache>
              <nodeExecutable>${spotless.nodeExecutable}</nodeExecutable>
              <configFile>${maven.multiModuleProjectDirectory}/.prettierrc</configFile>
            </prettier>
          </typescript>
          <pom>
            <sortPom>
              <expandEmptyElements>false</expandEmptyElements>
              <nrOfIndentSpace>4</nrOfIndentSpace>
              <sortDependencies>groupId,artifactId</sortDependencies>
            </sortPom>
          </pom>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>properties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
