<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0"
         xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
         
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-spreadsheet-testbench-api</artifactId>
    <version>3.1.1</version>

    <packaging>jar</packaging>    
    <name>Vaadin Spreadsheet Testbench API</name>
    <inceptionYear>2013</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <currentYear>2026</currentYear>
        
        <vaadin.version>8.14.4</vaadin.version>
        <testbench.version>5.1.2</testbench.version>
    </properties>

    <organization>
        <name>Vaadin Ltd</name>
        <url>https://vaadin.com</url>
    </organization>

    <repositories>
        <repository>
            <id>vaadin-addons</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
        </repository>
        <repository>
            <id>vaadin-prereleases</id>
            <url>https://maven.vaadin.com/vaadin-prereleases/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>vaadin-prereleases</id>
            <name>Vaadin Pre-releases</name>
            <url>https://maven.vaadin.com/vaadin-prereleases/</url>
        </snapshotRepository>
        <repository>
            <id>vaadin-addons</id>
            <name>Vaadin add-ons repository</name>
            <url>https://tools.vaadin.com/nexus/content/repositories/vaadin-addons</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-testbench-api</artifactId>
            <version>${vaadin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-testbench-core</artifactId>
            <version>${testbench.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.12.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <!-- Profile for updating license headers. -->
            <id>license</id>
            
            <build>
                <plugins>
                    <plugin> 
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>4.3</version>
                        <configuration>
                            <header>src/license/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>
                            <includes>
                                <include>/**/*.java</include>
                                <include>*.java</include>
                            </includes>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
