<?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>22.2.2</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>
    <sauce-connect.version>2.1.25</sauce-connect.version>
    <flow.version>9.2.3</flow.version>
    <osgi.bundle.license>https://vaadin.com/commercial-license-and-service-terms</osgi.bundle.license>
    <com.vaadin.tests.SharedBrowser.reuseBrowser>true</com.vaadin.tests.SharedBrowser.reuseBrowser>
    <maven.resources.plugin.version>3.0.2</maven.resources.plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jetty.stop.port>9999</jetty.stop.port>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.failsafe.plugin.version>2.22.1</maven.failsafe.plugin.version>
    <vaadin.pnpm.enable>false</vaadin.pnpm.enable>
    <testbench.version>7.1.1</testbench.version>
    <osgi.export.package>default</osgi.export.package>
    <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
    <ci-sauce.version>1.149</ci-sauce.version>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <jetty.version>9.4.15.v20190215</jetty.version>
    <sauce.options>--tunnel-identifier ${maven.build.timestamp}</sauce.options>
    <jetty.http.port>8080</jetty.http.port>
    <failsafe.forkCount>4</failsafe.forkCount>
    <failIfNoTests>false</failIfNoTests>
    <com.vaadin.testbench.Parameters.testsInParallel>1</com.vaadin.testbench.Parameters.testsInParallel>
    <currentYear>2023</currentYear>
  </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>flow-component-demo-helpers</artifactId>
        <version>${flow.version}</version>
        <exclusions>
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
          </exclusion>
        </exclusions>
      </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>1.7.25</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.cmpn</artifactId>
        <version>6.0.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>6.0.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-test-generic</artifactId>
        <version>${flow.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-test-util</artifactId>
        <version>${flow.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>3.10.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench-core</artifactId>
        <version>${testbench.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</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.0.1</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.0.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}

                          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>deploy-war</goal>
              </goals>
              <configuration>
                <systemProperties>
                  <systemProperty>
                    <name>vaadin.productionMode</name>
                    <value>true</value>
                  </systemProperty>
                </systemProperties>
              </configuration>
            </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>
            <scanIntervalSeconds>-1</scanIntervalSeconds>
            <stopPort>${jetty.stop.port}</stopPort>
            <stopWait>5</stopWait>
            <stopKey>foo</stopKey>
            <systemProperties>
              <systemProperty>
                <name>project.basedir</name>
                <value>${project.basedir}</value>
              </systemProperty>
            </systemProperties>
          </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>-Xmx1024m -XX:MaxPermSize=256m</argLine>
            <reuseForks>true</reuseForks>
            <trimStackTrace>false</trimStackTrace>
            <systemPropertyVariables>
              <webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver>
              <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>
              <sauce.user>${sauce.user}</sauce.user>
              <sauce.sauceAccessKey>${sauce.sauceAccessKey}</sauce.sauceAccessKey>
              <sauce.options>${sauce.options}</sauce.options>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.saucelabs.maven.plugin</groupId>
          <artifactId>sauce-connect-plugin</artifactId>
          <version>${sauce-connect.version}</version>
          <executions>
            <execution>
              <id>start-sauceconnect</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>start-sauceconnect</goal>
              </goals>
            </execution>
            <execution>
              <id>stop-sauceconnect</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>stop-sauceconnect</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>com.saucelabs</groupId>
              <artifactId>ci-sauce</artifactId>
              <version>${ci-sauce.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <sauceUsername>${sauce.user}</sauceUsername>
            <sauceAccessKey>${sauce.sauceAccessKey}</sauceAccessKey>
            <options>${sauce.options}</options>
          </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>
                <goal>build-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.0.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.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.3.1</version>
          <configuration>
            <failOnMissingWebXml>false</failOnMissingWebXml>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <header>src/license/vclst/header.txt</header>
            <quiet>false</quiet>
            <failIfMissing>true</failIfMissing>
            <aggregate>false</aggregate>
            <useDefaultExcludes>true</useDefaultExcludes>
            <useDefaultMapping>true</useDefaultMapping>
            <encoding>UTF-8</encoding>
            <properties>
              <year>${currentYear}</year>
            </properties>
            <excludes>
              <exclude>**/target/**</exclude>
              <exclude>**/*.xml</exclude>
              <exclude>**/*.css</exclude>
              <exclude>**/*.properties</exclude>
              <exclude>src/license/**/*</exclude>
              <exclude>**/*.txt</exclude>
              <exclude>scripts/**</exclude>
              <exclude>**/resources/META-INF/**</exclude>
              <exclude>**/demo/**</exclude>
              <exclude>**/tests/**</exclude>
              <exclude>**/test/**</exclude>
              <exclude>**/LICENSE/</exclude>
              <exclude>**/README.md/</exclude>
              <exclude>**/styles/**</exclude>
              <exclude>**/frontend/**</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.11.0</version>
        <dependencies>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>flow-buildtools</artifactId>
            <version>${flow.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <configFile>eclipse/VaadinJavaConventions.xml</configFile>
          <skipHtmlFormatting>true</skipHtmlFormatting>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
