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

    <groupId>org.vaadin.addons.componentfactory</groupId>
    <artifactId>selection-grid-pro-flow</artifactId>
    <version>2.2.1</version>
    <packaging>jar</packaging>

    <name>Selection GridPro</name>
    <description>Selection GridPro - Add the ability to focus on a particular row and column and select multiple rows with SHIFT-CTRL Click</description>

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

    <properties>
        <vaadin.version>24.3.1</vaadin.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-bom</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>${vaadin.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <repositories>
        <repository>
            <id>Vaadin Directory</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
        </repository>
        <!-- Repository needed for prerelease versions of Vaadin -->
        <repository>
            <id>Vaadin prereleases</id>
            <url>https://maven.vaadin.com/vaadin-prereleases</url>
        </repository>
        <!-- Repository needed for the snapshot versions of Vaadin -->
        <repository>
            <id>vaadin-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- Repository needed for prerelease versions of Vaadin -->
        <pluginRepository>
            <id>Vaadin prereleases</id>
            <url>https://maven.vaadin.com/vaadin-prereleases</url>
        </pluginRepository>
        <pluginRepository>
            <id>vaadin-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
            <releases><enabled>false</enabled></releases>
        </pluginRepository>
    </pluginRepositories>
    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <!-- Replace artifactId with vaadin-core to use only free components -->
            <artifactId>vaadin</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.0.0</version>
                <!--  Use `mvn license:update-file-header` to fix header problems -->
                <configuration>
                    <licenseName>vcl-1</licenseName>
                    <licenseResolver>${project.baseUri}/src/license</licenseResolver>
                    <includes>
                        <include>**/main/**/*.java</include>
                        <include>**/main/**/*.js</include>
                    </includes>
                    <failOnMissingHeader>true</failOnMissingHeader>
                    <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                    </execution>
                </executions>
            </plugin>
<!--             <plugin> -->
<!--                 <groupId>org.apache.maven.plugins</groupId> -->
<!--                 <artifactId>maven-javadoc-plugin</artifactId> -->
<!--                 <version>3.0.1</version> -->
<!--                 <configuration> -->
<!--                     <source>11</source> -->
<!--                 </configuration> -->
<!--                 <executions> -->
<!--                     <execution> -->
<!--                         <id>attach-javadoc</id> -->
<!--                         <goals> -->
<!--                             <goal>jar</goal> -->
<!--                         </goals> -->
<!--                     </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>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifest>
                            <addClasspath>false</addClasspath>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Vaadin-Package-Version>1</Vaadin-Package-Version>
                        </manifestEntries>
                    </archive>
					<!-- Generated file that shouldn't be included in add-ons -->
					<excludes>
						<exclude>META-INF/VAADIN/config/flow-build-info.json</exclude>
					</excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>directory</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.3.0</version>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>assembly/assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <phase>install</phase>
                            </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>verify</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
<!--                     <plugin> -->
<!--                         <groupId>org.apache.maven.plugins</groupId> -->
<!--                         <artifactId>maven-javadoc-plugin</artifactId> -->
<!--                         <version>3.0.1</version> -->
<!--                         <executions> -->
<!--                             <execution> -->
<!--                                 <id>attach-javadocs</id> -->
<!--                                 <phase>verify</phase> -->
<!--                                 <goals> -->
<!--                                     <goal>jar</goal> -->
<!--                                 </goals> -->
<!--                             </execution> -->
<!--                         </executions> -->
<!--                         <configuration> -->
<!--                             <quiet>true</quiet> -->
<!--                             <additionalparam>-Xdoclint:none</additionalparam> -->
<!--                         </configuration> -->
<!--                     </plugin> -->
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
