<?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>tigase</groupId>
    <artifactId>tigase-projects-parent</artifactId>
    <version>1.0.7-SNAPSHOT</version>

    <inceptionYear>2004</inceptionYear>

    <name>Tigase Projects master configuration</name>
    <description>bootstrap configuration for all Tigase projects</description>

    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <maven.compiler.release>21</maven.compiler.release>
        <!-- groovy now supports even 24 -->

        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>

        <slf4j.version>2.0.13</slf4j.version>
        <logback.version>1.5.16</logback.version>

        <packaging.type>bundle</packaging.type>

        <dist-dir>${project.build.directory}/_dist/</dist-dir>

        <guide_filename>index</guide_filename>
        <!--<guide_name></guide_name>-->
        <docs.source.directory>./src/main/asciidoc</docs.source.directory>
        <docs_path>${project.build.directory}/_docs</docs_path>
        <guide_path>${docs_path}/${guide_name}_Guide</guide_path>
        <maven.javadoc.skip>true</maven.javadoc.skip>

        <maven.build.timestamp.format>yyyy-MM-dd/HH:mm:ss</maven.build.timestamp.format>

        <sign-keystore>/path/to/jks.keystore</sign-keystore>
        <sign-alias>alias</sign-alias>
        <sign-storepass>storepass</sign-storepass>
        <sign-keypass>keypass</sign-keypass>
        <sign-skip>true</sign-skip>
        <sign-skip-server>true</sign-skip-server>
        <verbose-log>false</verbose-log>
        <tsa-uri />

        <groovyVersion>3.0.24</groovyVersion>
        <jteVersion>3.2.0</jteVersion>

        <scm_repo_base>https://tigase.dev/tigase</scm_repo_base>
        <scm_repo_server_base>${scm_repo_base}/_server</scm_repo_server_base>

        <!--@formatter:off-->
        <inlineHeader_agpl3>${project.name} - ${project.description}
Copyright (C) ${project.inceptionYear} ${owner} (${email})

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. Look for COPYING file in the top folder.
If not, see http://www.gnu.org/licenses/.
        </inlineHeader_agpl3>
        <inlineHeader_proprietary>${project.name} - ${project.description}
Copyright (C) ${project.inceptionYear} ${owner} (${email}) - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited
Proprietary and confidential
        </inlineHeader_proprietary>
        <!--@formatter:on-->

        <license.inlineHeader>${inlineHeader_proprietary}</license.inlineHeader>
        <source_generation.main.phase>none</source_generation.main.phase>

        <!-- to be included in desired projects -->
        <!-- public code can have AGPL3 licence -->
        <!--<license.inlineHeader>${inlineHeader_agpl3}</license.inlineHeader>-->
        <!-- public code can have sources published -->
        <!--<source_generation.main.phase>package</source_generation.main.phase>-->

        <!--<tests.logger_properties>src/test/resources/logging.properties</tests.logger_properties>-->
        <tests.logger_properties />
        <tests.excludeGroups />

        <documentation_phases.all_converters>none</documentation_phases.all_converters>
        <!-- <documentation_phases.all_converters>generate-resources</documentation_phases.all_converters>-->
        <documentation_phases.html>${documentation_phases.all_converters}</documentation_phases.html>
        <documentation_phases.docbook>${documentation_phases.all_converters}</documentation_phases.docbook>
        <documentation_phases.html_chunked>${documentation_phases.all_converters}</documentation_phases.html_chunked>
        <documentation_phases.pdf>${documentation_phases.all_converters}</documentation_phases.pdf>
        <documentation_phases.webhelp>none</documentation_phases.webhelp>

        <bundle-activator />
        <bundle-export-package>{local-packages}</bundle-export-package>
    </properties>

    <url>http://www.tigase.net/</url>

    <organization>
        <name>"Tigase, Inc."</name>
        <url>https://www.tigase.net</url>
    </organization>

    <licenses>
        <license>
            <name>Proprietary</name>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>kobit</id>
            <name>Artur Hefczyc</name>
            <email>kobit@tigase.org</email>
            <url>http://www.tigase.net/</url>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:${scm_repo_base}/${project.artifactId}.git</connection>
        <developerConnection>scm:git:${scm_repo_base}/${project.artifactId}.git</developerConnection>
        <url>${scm_repo_base}/${project.artifactId}</url>
      <tag>HEAD</tag>
  </scm>

    <issueManagement>
        <system>Redmine</system>
        <url>${scm_repo_base}/tigase-projects-parent</url>
    </issueManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>1.4.0</version>
        </dependency>
        <dependency>
            <groupId>jakarta.activation</groupId>
            <artifactId>jakarta.activation-api</artifactId>
            <version>2.1.3</version>
        </dependency>
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
            <version>1.0.0</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>dist</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>dist</name>
                </property>
            </activation>
            <properties>
                <maven.javadoc.skip>false</maven.javadoc.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <configuration>
                            <doclint>all,-missing,-html</doclint>

                            <!-- "failOn*" configuration to be removed once JDK11's issue with "javadoc: error - The code
                            being documented uses packages in the unnamed module, but the packages defined
                            in https://docs.oracle.com/en/java/javase/11/docs/api/ are in named modules." is fixed
                            Ref.: https://bugs.openjdk.java.net/browse/JDK-8212233

                            For now, `source` has to be set to '8' to make it work under JDK11 (even though it's
                            supposedly fixed)
                            -->
<!--                            <failOnError>false</failOnError>-->
                            <failOnWarnings>false</failOnWarnings>
                            <release combine.self="override" />
                            <detectJavaApiLink>false</detectJavaApiLink>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <quiet>true</quiet>
                                    <aggregate>true</aggregate>

                                    <destDir>${docs_path}/javadoc</destDir>

                                    <finalName>${project.artifactId}-${project.version}-b${git.total.commit.count}</finalName>
                                    <jarOutputDirectory>${dist-dir}</jarOutputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>output-html</id>
                                <phase>${documentation_phases.html}</phase>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>com.agilejava.docbkx</groupId>
                        <artifactId>docbkx-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-webhelp</id>
                                <phase>${documentation_phases.webhelp}</phase>
                            </execution>
                            <execution>
                                <id>generate-pdf</id>
                                <phase>${documentation_phases.pdf}</phase>
                            </execution>
                            <execution>
                                <id>generate-html</id>
                                <phase>${documentation_phases.html_chunked}</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jarsigner-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>
                            <archiveDirectory>${project.basedir}</archiveDirectory>
                            <includes>
                                <include>target/tigase*.?ar</include>
                                <include>jars/tigase*.?ar</include>
                            </includes>
                            <processMainArtifact>false</processMainArtifact>
                            <processAttachedArtifacts>false</processAttachedArtifacts>
                            <tsa>${tsa-uri}</tsa>
                            <skip>${sign-skip}</skip>

                            <keystore>${sign-keystore}</keystore>
                            <alias>${sign-alias}</alias>
                            <storepass>${sign-storepass}</storepass>
                            <keypass>${sign-keypass}</keypass>
                            <verbose>${verbose-log}</verbose>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-sources-jar</id>
                                <phase>${source_generation.main.phase}</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bundle-properties</id>
            <activation>
                <property>
                    <name>bundle-activator</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <configuration>
                            <instructions combine.inherited="append">
                                <Bundle-Activator>${bundle-activator}</Bundle-Activator>
                            </instructions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bundle-without-properties</id>
            <activation>
                <property>
                    <name>!bundle-activator</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>java9-and-newer</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>
                                --illegal-access=permit
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>proguard-jdk-le9</id>
            <activation>
                <jdk>[,9)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.github.wvengen</groupId>
                            <artifactId>proguard-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>Proguard</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>proguard</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <libs>
                                    <lib>${java.home}/lib/rt.jar</lib>
                                    <lib>${java.home}/lib/jce.jar</lib>
                                </libs>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>proguard-jdk-ge10</id>
            <activation>
                <jdk>[10,)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.github.wvengen</groupId>
                            <artifactId>proguard-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>Proguard</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>proguard</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <libs>
                                    <lib>${java.home}/jmods</lib>
                                </libs>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

    <build>
        <!--<finalName>${project.artifactId}-${git.total.commit.count}</finalName>-->
        <finalName>${project.artifactId}</finalName>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.1</version>
                    <executions>
                        <execution>
                            <id>non-bundle</id>
                            <phase>package</phase>
                            <configuration>
                                <archive>
                                    <addMavenDescriptor>false</addMavenDescriptor>
                                    <manifest>
                                        <addClasspath>true</addClasspath>
                                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                    </manifest>
                                    <manifestEntries>
                                        <Implementation-Version>${project.version}-b${git.total.commit.count}/${git.commit.id.abbrev}
                                        </Implementation-Version>
                                        <Implementation-Build>${git.total.commit.count}/${git.commit.id.abbrev} (${maven.build.timestamp})
                                        </Implementation-Build>
                                        <Tigase-Version>${project.version}-b${git.total.commit.count}</Tigase-Version>
                                    </manifestEntries>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.5.1</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions combine.inherited="append">
                            <manifestLocation>src/main/resources/META-INF/MANIFEST.MF</manifestLocation>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}-b${git.total.commit.count}/${git.commit.id.abbrev}
                            </Implementation-Version>
                            <Implementation-Build>${git.total.commit.count}/${git.commit.id.abbrev} (${maven.build.timestamp})
                            </Implementation-Build>
                            <Tigase-Version>${project.version}-b${git.total.commit.count}</Tigase-Version>
                            <Import-Package>!junit.*,!sun.*,!com.sun.*,*</Import-Package>
                            <Export-Package>${bundle-export-package}</Export-Package>
                            <DynamicImport-Package>*</DynamicImport-Package>
                            <Bundle-SymbolicName>${project.artifactId};singleton=true</Bundle-SymbolicName>
                        </instructions>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>copy-resources</id>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <phase>validate</phase>
                            <configuration>
                                <outputDirectory>${basedir}/${guide_path}/html</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>src/non-packaged-resources</directory>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <gemPath>gems-provided</gemPath>
                        <sourceDirectory>${docs.source.directory}</sourceDirectory>
                        <sourceDocumentName>${guide_filename}.asciidoc</sourceDocumentName>
                        <preserveDirectories>true</preserveDirectories>
                        <doctype>book</doctype>
                        <attributes>
                            <toc>left</toc>
                            <sectanchors>true</sectanchors>
                            <linkcss>true</linkcss>
                            <imagesdir>.</imagesdir>

                            <source-highlighter>prettify</source-highlighter>

                            <endpoint-url>http://docs.tigase.net</endpoint-url>

                            <document-title>${project.name}</document-title>
                            <revnumber>${project.version}</revnumber>
                            <project-version>${project.version}</project-version>
                            <revdate>${maven.build.timestamp}</revdate>
                            <organization>${project.organization.name}</organization>
                        </attributes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>output-html</id>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <phase>${documentation_phases.html}</phase>
                            <configuration>
                                <outputDirectory>${guide_path}/html</outputDirectory>
                                <backend>html5</backend>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.3.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>4.0.0-M14</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.7.1</version>
                    <executions>
                        <execution>
                            <id>dist</id>
                            <phase>none</phase>
                            <!--<phase>package</phase>-->
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>src/main/resources/assembly/dist.xml</descriptor>
                                </descriptors>
                                <tarLongFileMode>gnu</tarLongFileMode>
                                <finalName>${project.artifactId}-${project.version}-b${git.total.commit.count}</finalName>
                                <outputDirectory>${dist-dir}</outputDirectory>
                                <appendAssemblyId>false</appendAssemblyId>
                            </configuration>
                        </execution>
                        <execution>
                            <id>resources</id>
                            <phase>none</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>src/main/resources/assembly/resources.xml</descriptor>
                                </descriptors>
                                <tarLongFileMode>gnu</tarLongFileMode>
                                <finalName>${project.artifactId}-resources-${project.version}-b${git.total.commit.count}</finalName>
                                <outputDirectory>${dist-dir}</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.github.wvengen</groupId>
                    <artifactId>proguard-maven-plugin</artifactId>
                    <version>2.5.3</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.guardsquare</groupId>
                            <artifactId>proguard-base</artifactId>
                            <version>7.2.1</version>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>Proguard</id>
                            <phase>package</phase>
                            <goals>
                                <goal>proguard</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <options>
                            <!--<option>-printseeds</option>-->
                            <!--<option>-verbose</option>-->

                            <option>-allowaccessmodification</option>

                            <option>-dontwarn</option>
                            <option>-dontshrink</option>
                            <option>-dontoptimize</option>

                            <option>-renamesourcefileattribute SourceFile</option>

                            <option>-keeppackagenames</option>
                            <option>-keepparameternames</option>

                            <option>-keep public class * {public protected *; @tigase.kernel.beans.Inject private *;
                                @tigase.kernel.beans.config.ConfigField private *;}
                            </option>

                            <option>-keepattributes Exceptions,InnerClasses,Signature,
                                Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
                            </option>
                        </options>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>4.1</version>
                    <!--<version>4.6</version>-->
                    <!-- https://github.com/mathieucarbou/license-maven-plugin/releases/tag/license-maven-plugin-4.6 -->
                    <!-- https://mvnrepository.com/artifact/com.mycila/license-maven-plugin/4.6 -->
                    <configuration>
                        <properties>
                            <owner>Tigase, Inc.</owner>
                            <email>office@tigase.com</email>
                        </properties>
                        <excludes>
                            <exclude>**/COPYING</exclude>
                            <exclude>**/LICENSE</exclude>
                            <exclude>**/README</exclude>
                            <exclude>**/License.html</exclude>
                            <exclude>**/package.html</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.tdsl</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.cot</exclude>
                            <exclude>**/*.cor</exclude>
                            <exclude>**/*.xmpt</exclude>
                            <exclude>**/.*</exclude>
                            <exclude>**/pom.xml</exclude>
                            <exclude>**/build.xml</exclude>
                            <exclude>**/ant-definitions.xml</exclude>
                            <exclude>src/test/resources/**</exclude>
                            <exclude>src/main/resources/**</exclude>
                            <exclude>src/main/asciidoc/**/*</exclude>
                            <exclude>**/.github/**/*</exclude>
                            <exclude>.github/FUNDING.yml</exclude>
                        </excludes>
<!--                        https://github.com/mycila/license-maven-plugin/issues/118-->
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <id>licence</id>
                            <phase>none</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.21.0</version>
                    <configuration>
                        <linkXref>true</linkXref>
                        <sourceEncoding>utf-8</sourceEncoding>
                        <minimumTokens>100</minimumTokens>
                        <targetJdk>1.8</targetJdk>
                        <excludes>
                            <exclude>**/*Bean.java</exclude>
                            <exclude>**/generated/*.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>false</failsOnError>
                        <linkXRef>false</linkXRef>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.7.3.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>gg.jte</groupId>
                    <artifactId>jte-maven-plugin</artifactId>
                    <version>${jteVersion}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <excludedGroups>${tests.excludeGroups}</excludedGroups>
                    <parallel>suitesAndClasses</parallel>
                    <threadCount>10</threadCount>
                    <systemPropertyVariables>
                        <property>
                            <name>java.util.logging.config.file</name>
                            <value>${tests.logger_properties}</value>
                        </property>
                    </systemPropertyVariables>
                    <systemPropertyVariables>
                        <project.target>${project.build.outputDirectory}</project.target>
                        <project.version>${project.version}</project.version>
                    </systemPropertyVariables>
                    <dependenciesToScan>
                        <dependency>tigase:tigase-utils</dependency>
                    </dependenciesToScan>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>add-resource</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/main/database</directory>
                                    <targetPath>database</targetPath>
                                    <includes>
                                        <include>**/*.sql</include>
                                        <include>**/*.sh</include>
                                        <include>**/*.cmd</include>
                                        <include>**/*.txt</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/.*</exclude>
                                    </excludes>
                                </resource>

                                <resource>
                                    <directory>src/main/groovy/tigase/</directory>
                                    <targetPath>scripts</targetPath>
                                    <includes>
                                        <include>**/*.groovy</include>
                                        <include>**/*.js</include>
                                        <include>**/*.html</include>
                                        <include>**/*.png</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/.*</exclude>
                                    </excludes>
                                </resource>

                                <resource>
                                    <directory>${docs.source.directory}</directory>
                                    <targetPath>documentation</targetPath>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/.*</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <releaseProfiles>dist,docs</releaseProfiles>
                    <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version> <!-- there is version <version>3.2.0</version> but requires adjusting configuration-->
                <configuration>
                    <timestampFormat>{0,date} {0,time}</timestampFormat>
                    <shortRevisionLength>8</shortRevisionLength>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <!-- fix issue with recompiling everything even if there weren't any changes in sources -->
                    <compilerArgs>
                        <arg>-Xpkginfo:always</arg>
<!--                        <arg>-XDcompilePolicy=simple</arg>-->
<!--                        <arg>-Xplugin:ErrorProne -XepOpt:NullAway:AnnotatedPackages=com.uber</arg>-->

<!--                        &lt;!&ndash;for errorprone&ndash;&gt;-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>-->
<!--                        <arg>-J&#45;&#45;add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>-->
                    </compilerArgs>
<!--                    <annotationProcessorPaths>-->
<!--                        <path>-->
<!--                            <groupId>com.google.errorprone</groupId>-->
<!--                            <artifactId>error_prone_core</artifactId>-->
<!--                            <version>2.23.0</version>-->
<!--                        </path>-->
<!--                        <path>-->
<!--                            <groupId>com.uber.nullaway</groupId>-->
<!--                            <artifactId>nullaway</artifactId>-->
<!--                            <version>0.10.15</version>-->
<!--                        </path>-->
<!--                    </annotationProcessorPaths>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <version>8.0.2</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <includeOnlyProperties>
                        <includeOnlyProperty>git.total.commit.count</includeOnlyProperty>
                        <includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
                    </includeOnlyProperties>
                    <abbrevLength>8</abbrevLength>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-test-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <repositories>
        <repository>
            <id>tigase</id>
            <url>https://maven-repo.tigase.org/repository/tigase</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>sonatype.snapshots</id>
            <name>Maven Plugin Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>tigase</id>
            <name>Tigase repository</name>
            <url>https://maven-repo.tigase.net/repository/release</url>
        </repository>
        <snapshotRepository>
            <id>tigase-snapshot</id>
            <name>Tigase snapshot repository</name>
            <url>https://maven-repo.tigase.net/repository/snapshot</url>
        </snapshotRepository>
    </distributionManagement>
</project>
