<?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>
    <parent>
        <groupId>com.vaadin</groupId>
        <artifactId>flow-project</artifactId>
        <version>24.10.preserve-on-refresh-app-shell-title-SNAPSHOT</version>
    </parent>
    <artifactId>flow-polymer-template</artifactId>
    <name>Flow Polymer Templates Support</name>
    <description>${project.name}</description>
    <packaging>jar</packaging>

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

    <properties>
        <cvdlName>flow-polymer-template</cvdlName>
        <currentYear>2022</currentYear>
    </properties>

    <dependencies>

        <!-- Project dependencies -->

        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>flow-server</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>license-checker</artifactId>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
        </dependency>

        <!-- TESTING DEPENDENCIES -->

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

        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-web-api</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <version>${osgi.core.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.cmpn</artifactId>
            <version>${osgi.compendium.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <index>false</index>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludedGroups>${test.excludegroup}</excludedGroups>
                    <enableAssertions>true</enableAssertions>
                    <classpathDependencyExcludes>
                        <classpathDependencyExclude>org.osgi:org.osgi.core</classpathDependencyExclude>
                    </classpathDependencyExcludes>
                </configuration>
            </plugin>

        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>5.0.0</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>**/*.properties</exclude>
                            <exclude>src/license/**/*</exclude>
                            <exclude>**/*.txt</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
