<?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>2.2.1</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-flow-components</artifactId>
  <version>24.3.3</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>
  <properties>
    <cvdlName></cvdlName>
    <jetty.version>11.0.13</jetty.version>
    <flow.version>24.3.3</flow.version>
    <maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
    <jetty.http.port>8080</jetty.http.port>
    <karaf-maven-plugin.version>4.4.4</karaf-maven-plugin.version>
    <osgi.export.package>default</osgi.export.package>
    <poi.version>5.2.5</poi.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jakarta.servlet.api.version>5.0.0</jakarta.servlet.api.version>
    <maven.failsafe.plugin.version>3.2.2</maven.failsafe.plugin.version>
    <com.vaadin.tests.SharedBrowser.reuseBrowser>true</com.vaadin.tests.SharedBrowser.reuseBrowser>
    <javaparser.version>3.25.3</javaparser.version>
    <jetty.stop.port>9999</jetty.stop.port>
    <osgi.bundle.license>http://www.apache.org/licenses/LICENSE-2.0</osgi.bundle.license>
    <maven.compiler.source>17</maven.compiler.source>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <failIfNoTests>false</failIfNoTests>
    <failsafe.forkCount>4</failsafe.forkCount>
    <maven.compiler.target>17</maven.compiler.target>
    <jakarta.web.api.version>10.0.0</jakarta.web.api.version>
    <com.vaadin.testbench.Parameters.testsInParallel>1</com.vaadin.testbench.Parameters.testsInParallel>
    <maven.surefire.plugin.version>3.2.2</maven.surefire.plugin.version>
    <vaadin.pnpm.enable>false</vaadin.pnpm.enable>
    <testbench.version>9.2.1</testbench.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow</artifactId>
        <version>${flow.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-server</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-client</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-data</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-html-components</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>flow-server-production-mode</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-osgi</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-lit-template</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-polymer-template</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-dev-server</artifactId>
        <version>${flow.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>2.0.9</version>
      </dependency>
      <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>${jakarta.servlet.api.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.cmpn</artifactId>
        <version>7.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>6.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.14.0</version>
      </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>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.6.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</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>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-scratchpad</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml-full</artifactId>
        <version>${poi.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.javaparser</groupId>
        <artifactId>javaparser-core</artifactId>
        <version>${javaparser.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-web-api</artifactId>
        <version>${jakarta.web.api.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.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.6.3</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>6.4.0</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</groupId>
          <artifactId>jetty-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>
          <configuration>
            <excludes>
              <exclude>${exclude.tests}</exclude>
            </excludes>
          </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>
          <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>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>1.2.1</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.3.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.4.0</version>
          <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.4.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.23.0</version>
        <configuration>
          <configFile>https://raw.githubusercontent.com/vaadin/flow/main/eclipse/VaadinJavaConventions.xml</configFile>
          <skipHtmlFormatting>true</skipHtmlFormatting>
          <excludes>
            <exclude>**/*.css</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
