<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.confluence.plugins</groupId>
        <artifactId>confluence-content-plugins</artifactId>
        <version>19.2.17</version>
    </parent>

    <artifactId>confluence-emoticons-project</artifactId>
    <packaging>pom</packaging>

    <modules>
        <module>functional-tests</module>
        <module>plugin</module>
    </modules>

    <properties>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <!-- failsafe 2.20.1 or newer required for rerun support. Double check the version from the parent-pom -->
        <maven.test.skip>${skipTests}</maven.test.skip>
        <!-- For the flaky test reporter profile. -->
        <!-- override the versions of the listed plugins in amps -->
        <version.override.set>maven-failsafe-plugin</version.override.set>
        <xvfb.display>:0</xvfb.display>
        <xvfb.enable>false</xvfb.enable>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <configuration>
                    <maxmemory>2048m</maxmemory>
                    <doclint>none</doclint>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>spotbugs</id>
            <properties>
                <findsecbugs.version>1.12.0</findsecbugs.version>
                <spotbugs-maven.version>4.7.1.1</spotbugs-maven.version>
                <spotbugs.effort>max</spotbugs.effort>
                <spotbugs.excludes>spotbugs-excludes.xml</spotbugs.excludes>
                <spotbugs.failonerror>true</spotbugs.failonerror>
                <spotbugs.maxHeap>2048</spotbugs.maxHeap>
                <!-- These visitors are from the findsecbugs plugin, and they crap out when run. Seems to be a bug in those visitors -->
                <spotbugs.omit.visitors />
                <spotbugs.skip>false</spotbugs.skip>
                <spotbugs.threshold>Medium</spotbugs.threshold>
                <spotbugs.version>4.7.1</spotbugs.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <version>${spotbugs-maven.version}</version>
                        <configuration>
                            <xmlOutput>true</xmlOutput>
                            <excludeFilterFile>${spotbugs.excludes}</excludeFilterFile>
                            <maxHeap>${spotbugs.maxHeap}</maxHeap>
                            <threshold>${spotbugs.threshold}</threshold>
                            <effort>${spotbugs.effort}</effort>
                            <omitVisitors>${spotbugs.omit.visitors}</omitVisitors>
                            <skip>${spotbugs.skip}</skip>
                            <failOnError>${spotbugs.failonerror}</failOnError>
                            <plugins>
                                <plugin>
                                    <groupId>com.h3xstream.findsecbugs</groupId>
                                    <artifactId>findsecbugs-plugin</artifactId>
                                    <version>${findsecbugs.version}</version>
                                </plugin>
                            </plugins>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.github.spotbugs</groupId>
                                <artifactId>spotbugs</artifactId>
                                <version>${spotbugs.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
