<?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>

    <artifactId>flow-component-base</artifactId>
    <version>1.2.1</version>
    <packaging>pom</packaging>
    <name>Flow component base</name>
    <description>Parent pom for individual component modules</description>

    <parent>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-parent</artifactId>
        <version>2.0.1</version>
    </parent>

    <properties>
        <!-- Should be overridden in child modules -->
        <flow.version>1.2.2</flow.version>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8
        </project.reporting.outputEncoding>

        <!-- 9.4.X version is causing component builds fail on cannot connect to server -->
        <jetty.version>9.3.24.v20180605</jetty.version>
        <maven.failsafe.plugin.version>2.20</maven.failsafe.plugin.version>
        <maven.resources.plugin.version>3.0.2</maven.resources.plugin.version>
        <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
        <driver.binary.downloader.maven.plugin.version>1.0.14
        </driver.binary.downloader.maven.plugin.version>

        <!-- OSGi support -->
        <osgi.bundle.import.package>*</osgi.bundle.import.package>
        <osgi.bundle.export.package>com.vaadin.flow.component.*;-noimport:=true</osgi.bundle.export.package>
        <osgi.bundle.required.execution.environment>JavaSE-1.8</osgi.bundle.required.execution.environment>
        <osgi.bundle.license>http://www.apache.org/licenses/LICENSE-2.0</osgi.bundle.license>
        <osgi.bundle.name>${project.artifactId}</osgi.bundle.name>
        <osgi.bundle.symbolic.name>${project.groupId}.flow.component.${component.package.name}</osgi.bundle.symbolic.name>
        <osgi.bundle.package.private></osgi.bundle.package.private>
        <osgi.bundle.bundle.activator></osgi.bundle.bundle.activator>
        <osgi.bundle.description></osgi.bundle.description>
    </properties>

    <distributionManagement>
        <repository>
            <id>vaadin-staging</id>
            <name>Vaadin release staging repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>vaadin-snapshots</id>
            <name>Vaadin snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>vaadin-prereleases</id>
            <url>https://maven.vaadin.com/vaadin-prereleases</url>
        </repository>
        <repository>
            <id>vaadin-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        </repository>
    </repositories>

    <dependencyManagement>

        <dependencies>
            <!--
                all other dependencies have this dependency excluded because
                https://repo1.maven.org/maven2/org/webjars/bowergithub/polymerelements/iron-flex-layout/1.3.7/
                has no pom.xml (i.e. package is in the corrupt state).
                It causes nexus plugin used in released builds to fail.
            -->
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-flex-layout</artifactId>
                <version>2.0.3</version>
            </dependency>

            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-checkbox</artifactId>
                <version>2.2.3</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-icons</artifactId>
                <version>4.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-ordered-layout</artifactId>
                <version>1.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-button</artifactId>
                <version>2.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-text-field</artifactId>
                <version>2.1.5</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-date-picker</artifactId>
                <version>3.3.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-dialog</artifactId>
                <version>2.2.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-combo-box</artifactId>
                <version>4.2.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-form-layout</artifactId>
                <version>2.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-grid</artifactId>
                <version>5.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-radio-button</artifactId>
                <version>1.1.2</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-list-box</artifactId>
                <version>1.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-notification</artifactId>
                <version>1.2.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-progress-bar</artifactId>
                <version>1.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-split-layout</artifactId>
                <version>4.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-tabs</artifactId>
                <version>2.1.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-upload</artifactId>
                <version>4.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-context-menu</artifactId>
                <version>4.2.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-time-picker</artifactId>
                <version>1.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-lumo-styles</artifactId>
                <version>1.3.2</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-material-styles</artifactId>
                <version>1.2.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-item</artifactId>
                <version>2.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-overlay</artifactId>
                <version>3.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-list-mixin</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-element-mixin</artifactId>
                <version>2.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-usage-statistics</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-development-mode-detector</artifactId>
                <version>2.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-themable-mixin</artifactId>
                <version>1.3.2</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.vaadin</groupId>
                <artifactId>vaadin-control-state-mixin</artifactId>
                <version>2.1.1</version>
            </dependency>

            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-icon</artifactId>
                <version>2.1.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.webjars.bowergithub.polymerelements</groupId>
                        <artifactId>iron-flex-layout</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-meta</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-iconset-svg</artifactId>
                <version>2.2.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-a11y-keys-behavior</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-resizable-behavior</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-a11y-announcer</artifactId>
                <version>2.1.0</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-list</artifactId>
                <version>2.0.19</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-scroll-target-behavior</artifactId>
                <version>2.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-overlay-behavior</artifactId>
                <version>2.3.4</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-fit-behavior</artifactId>
                <version>2.2.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.polymerelements</groupId>
                <artifactId>iron-media-query</artifactId>
                <version>2.1.0</version>
            </dependency>

            <dependency>
                <groupId>org.webjars.bowergithub.polymer</groupId>
                <artifactId>polymer</artifactId>
                <version>2.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.webcomponents</groupId>
                <artifactId>webcomponentsjs</artifactId>
                <version>1.2.6</version>
            </dependency>
            <dependency>
                <groupId>org.webjars.bowergithub.webcomponents</groupId>
                <artifactId>shadycss</artifactId>
                <version>1.5.0-1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
                <configuration>
                    <httpConnector>
                        <port>9998</port>
                    </httpConnector>
                    <scanIntervalSeconds>-1</scanIntervalSeconds>
                    <stopPort>9999</stopPort>
                    <stopWait>5</stopWait>
                    <stopKey>foo</stopKey>
                    <!-- Use TestScope because the test classes are in the
                        test package. -->
                    <useTestScope>true</useTestScope>
                    <webAppConfig>
                        <containerIncludeJarPattern>^$</containerIncludeJarPattern>
                    </webAppConfig>
                </configuration>
                <executions>
                    <!-- start and stop jetty (running our app) when running
                        integration tests -->
                    <execution>
                        <id>start-jetty</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-jetty</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
                    <systemPropertyVariables>
                        <webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver>
                    </systemPropertyVariables>
                </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.googlecode.maven-download-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <version>1.3.0</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>https://raw.githubusercontent.com/vaadin/flow/master/drivers.xml</url>
                            <outputFileName>drivers.xml</outputFileName>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <quiet>true</quiet>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${osgi.bundle.name}</Bundle-Name>
                        <Bundle-SymbolicName>${osgi.bundle.symbolic.name}</Bundle-SymbolicName>
                        <Import-Package>${osgi.bundle.import.package}</Import-Package>
                        <Export-Package>${osgi.bundle.export.package}</Export-Package>
                        <Private-Package>${osgi.bundle.package.private}</Private-Package>
                        <Bundle-Activator>${osgi.bundle.bundle.activator}</Bundle-Activator>
                        <Bundle-License>${osgi.bundle.license}</Bundle-License>
                        <Bundle-Description>${osgi.bundle.description}</Bundle-Description>
                        <_removeheaders>Built-By</_removeheaders>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>extract-component-name</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>component.name</name>
                            <regex>vaadin-(\w+(-\w+)*)-flow</regex>
                            <value>${project.artifactId}</value>
                            <replacement>$1</replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                    <execution>
                        <id>extract-component-package-name</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>component.package.name</name>
                            <regex>-</regex>
                            <value>${component.name}</value>
                            <replacement></replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.googlecode.maven-download-plugin</groupId>
                                        <artifactId>download-maven-plugin</artifactId>
                                        <versionRange>[1.3.0,)</versionRange>
                                        <goals>
                                            <goal>wget</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnIncremental>false</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>flow-test-util</artifactId>
            <version>${flow.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.webjars.bowergithub.polymer</groupId>
            <artifactId>polymer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars.bowergithub.webcomponents</groupId>
            <artifactId>webcomponentsjs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars.bowergithub.webcomponents</groupId>
            <artifactId>shadycss</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>with-manifest</id>
            <activation>
                <file>
                    <missing>${basedir}/.parent-indicator</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.0.2</version>
                        <configuration>
                            <finalName>${project.artifactId}</finalName>
                            <archive>
                                <manifestFile>
                                    ${project.build.outputDirectory}/META-INF/MANIFEST.MF
                                </manifestFile>
                                <manifestEntries>
                                    <Built-By></Built-By>
                                </manifestEntries>
                            </archive>
                        </configuration>
                        <executions>
                            <execution>
                                <id>test-jar</id>
                                <configuration>
                                    <includes>
                                        <include>**/demo/**</include>
                                        <include>**/META-INF/resources/**</include>
                                    </includes>
                                    <classifier>demo</classifier>
                                </configuration>
                                <goals>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>without-manifest</id>
            <activation>
                <file>
                    <exists>${basedir}/.parent-indicator</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.0.2</version>
                        <configuration>
                            <finalName>${project.artifactId}</finalName>
                        </configuration>
                        <executions>
                            <execution>
                                <id>test-jar</id>
                                <configuration>
                                    <includes>
                                        <include>**/demo/**</include>
                                        <include>**/META-INF/resources/**</include>
                                    </includes>
                                    <classifier>demo</classifier>
                                </configuration>
                                <goals>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>local-run</id>
            <activation>
                <property>
                    <name>!test.use.hub</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.selenium</groupId>
                        <artifactId>driver-binary-downloader-maven-plugin</artifactId>
                        <version>${driver.binary.downloader.maven.plugin.version}</version>
                        <configuration>
                            <onlyGetDriversForHostOperatingSystem>true</onlyGetDriversForHostOperatingSystem>
                            <rootStandaloneServerDirectory>${project.build.directory}/driver</rootStandaloneServerDirectory>
                            <downloadedZipFileDirectory>${project.build.directory}/driver_zips</downloadedZipFileDirectory>
                            <customRepositoryMap>${project.build.directory}/drivers.xml</customRepositoryMap>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>selenium</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>runTests</id>
            <dependencies>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>flow-server</artifactId>
                    <version>${flow.version}</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>flow-client</artifactId>
                    <version>${flow.version}</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>flow-data</artifactId>
                    <version>${flow.version}</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>flow-html-components</artifactId>
                    <version>${flow.version}</version>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>
