<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench-parent</artifactId>
        <version>5.4-SNAPSHOT</version>
    </parent>

    <artifactId>vaadin-testbench-core</artifactId>
    <packaging>jar</packaging>
    <name>Vaadin TestBench Core</name>
    <inceptionYear>2012</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Selenium 4.13.0 is the last one that supports Java 8 -->
        <selenium.version>4.13.0</selenium.version>
        
        <!-- Overridden Selenium dependency versions: -->
        <!-- Upgraded from 2.12.3 because of CVEs as of 2026-05-08 -->
        <asynchttpclient.version>2.14.5</asynchttpclient.version>
        <!-- Original transitive dependency was 2.0.4,
             it had no CVEs as of 2026-05-08 but 2.0.17
             is what async-http-client 2.14.5 uses -->
        <com.typesafe.netty.version>2.0.17</com.typesafe.netty.version>
        <!-- Use latest 4.1.x version,
             4.2.x is not completely backwards compatible -->
        <io.netty.version>4.1.133.Final</io.netty.version>

        <snapshot.repository.url>https://maven.vaadin.com/vaadin-prereleases/
        </snapshot.repository.url>
    </properties>

    <licenses>
        <license>
            <name>Vaadin Commercial License</name>
            <url>https://vaadin.com/commercial-license-and-service-terms</url>
            <distribution>manual</distribution>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>vaadin-prereleases</id>
                    <name>Vaadin prereleases repository</name>
                    <url>${snapshot.repository.url}</url>
                </snapshotRepository>
                <repository>
                    <id>vaadin-addons</id>
                    <name>Vaadin add-ons repository</name>
                    <url>https://maven.vaadin.com/vaadin-addons</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.3.1</version>
                        <configuration>
                            <archive>
                                <index>true</index>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <!-- Implementation-Title and Implementation-Version come from the
                                        POM by default -->
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                </manifest>
                                <manifestEntries>
                                    <!-- Package format version - do not change -->
                                    <Vaadin-Package-Version>1</Vaadin-Package-Version>
                                </manifestEntries>
                            </archive>
                            <excludes>
                                <!-- Remove resources included due to gwt compilation -->
                                <exclude>**/demoandtestapp/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>

                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>license-checker</artifactId>
            <version>1.13.5</version>
            <exclusions>
                <!-- Dependency convergence exclusions: -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.18.0</version>
        </dependency>

        <!-- Selenium has a lot of dependency convergence issues.
             They are dealt with here, so that they don't need to be
             dealt with in projects that use TestBench. -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${selenium.version}</version>
            <exclusions>
                <!-- CVE exclusions: -->
                <exclusion>
                    <groupId>org.asynchttpclient</groupId>
                    <artifactId>async-http-client</artifactId>
                </exclusion>
                <!-- Dependency convergence exclusions: -->
                <exclusion>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Selenium-related dependency convergence inclusions: -->
        <dependency>
            <groupId>org.asynchttpclient</groupId>
            <artifactId>async-http-client</artifactId>
            <version>${asynchttpclient.version}</version>
            <exclusions>
                <!-- Dependency convergence exclusions: -->
                <exclusion>
                    <groupId>com.typesafe.netty</groupId>
                    <artifactId>netty-reactive-streams</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.typesafe.netty</groupId>
            <artifactId>netty-reactive-streams</artifactId>
            <!-- Original transitive dependency was 2.0.4,
                 it had no CVEs as of 2026-05-08 but 2.0.17
                 is what async-http-client 2.14.5 uses -->
            <version>${com.typesafe.netty.version}</version>
            <exclusions>
                <!-- Dependency convergence exclusions: -->
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-buffer</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-classes-epoll</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-classes-kqueue</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-kqueue</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-unix-common</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <!-- End of Selenium-related dependency convergence inclusions. -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>5.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.31.0-GA</version>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-elemental</artifactId>
            <version>2.9.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.gwt</groupId>
                    <artifactId>gwt-user</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- License-checker uses SLF4J logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>2.0.17</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
