<?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>co.elastic.thumbnails4j</groupId>
    <artifactId>thumbnails4j</artifactId>
    <description>open source project for generating file thumbnail images with the JVM</description>
    <packaging>pom</packaging>
    <version>1.2.0</version>

    <name>${project.groupId}:${project.artifactId}</name>

    <inceptionYear>2021</inceptionYear>

    <organization>
        <name>Elastic Inc.</name>
        <url>https://www.elastic.co</url>
    </organization>

    <url>https://github.com/elastic/thumbnails4j</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:elastic/thumbnails4j.git</connection>
        <developerConnection>scm:git:https://github.com/elastic/thumbnails4j.git</developerConnection>
        <url>https://github.com/elastic/thumbnails4j</url>
        <tag>v1.2.0</tag>
    </scm>

    <developers>
        <developer>
            <name>Elastic</name>
            <url>https://discuss.elastic.co/c/workplace-search</url>
            <organization>Elastic Inc.</organization>
            <organizationUrl>https://www.elastic.co</organizationUrl>
        </developer>
        <developer>
            <id>seanstory</id>
            <name>Sean Story</name>
            <url>https://github.com/seanstory</url>
        </developer>
        <developer>
            <id>adam-harwood</id>
            <name>Adam Harwood</name>
            <url>https://github.com/adam-harwood</url>
        </developer>
    </developers>

    <modules>
        <module>thumbnails4j-all</module>
        <module>thumbnails4j-core</module>
        <module>thumbnails4j-image</module>
        <module>thumbnails4j-doc</module>
        <module>thumbnails4j-docx</module>
        <module>thumbnails4j-pdf</module>
        <module>thumbnails4j-pptx</module>
        <module>thumbnails4j-xls</module>
        <module>thumbnails4j-xlsx</module>
    </modules>

    <properties>
        <slf4j.version>1.7.25</slf4j.version>
        <poi.version>5.2.5</poi.version>
        <xdocreport.version>2.0.6</xdocreport.version>
        <pdfbox.version>3.0.5</pdfbox.version>
        <jakarta.version>2.3.2</jakarta.version>
        <jaxb.version>2.3.2</jaxb.version>

        <groovy.version>3.0.8</groovy.version>
        <spock.version>2.0-groovy-3.0</spock.version>
        <cglib.version>3.3.0</cglib.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.scm.id>github</project.scm.id>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-scratchpad</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>${poi.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.github.virtuald</groupId>
                        <artifactId>curvesap</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml-full</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>fr.opensagres.xdocreport</groupId>
                <artifactId>fr.opensagres.xdocreport.converter.docx.xwpf</artifactId>
                <version>${xdocreport.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.lowagie</groupId>
                        <artifactId>itext</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
                <version>${pdfbox.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>${jakarta.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${jaxb.version}</version>
            </dependency>

            <!-- test dependencies -->
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovy.version}</version>
                <scope>test</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.spockframework</groupId>
                <artifactId>spock-core</artifactId>
                <version>${spock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>${cglib.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.jasig.maven</groupId>
                <artifactId>maven-notice-plugin</artifactId>
                <version>1.1.0</version>
                <configuration>
                    <fileName>NOTICE.txt</fileName>
                    <noticeTemplate>${project.basedir}/NOTICE.txt.template</noticeTemplate>
                    <includeScopes>
                        <includeScope>compile</includeScope>
                    </includeScopes>
                </configuration>
                <executions>
                    <execution>
                        <id>update-notice</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>jakarta.xml.bind</groupId>
                        <artifactId>jakarta.xml.bind-api</artifactId>
                        <version>${jakarta.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-runtime</artifactId>
                        <version>${jaxb.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>copy-resource-one</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/src/main/resources/META-INF</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.basedir}</directory>
                                    <includes>
                                        <include>NOTICE.txt</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>3.3.0-01</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>2.5.12-01</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <!-- to prevent the ForkedBooter process from stealing the window focus on Mac OS -->
                    <argLine>-Djava.awt.headless=true</argLine>
                </configuration>
            </plugin>

            <!-- requirements for releasing to maven central -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.5</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>gpg</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </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-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <!-- Sign all artifacts (requires gpg installation). -->
        <profile>
            <id>gpg</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>


</project>
