<?xml version='1.0' encoding='UTF-8'?>

<!--
  ~ Copyright (c) jGuru Europe AB.
  ~ All rights reserved.
  -->

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

    <!--
    ################################################
    # Section 1:  Project information
    ################################################
    -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
        <relativePath />
    </parent>

    <groupId>se.jguru.codestyle</groupId>
    <artifactId>jguru-codestyle</artifactId>
    <version>1.2.0</version>
    <name>${project.artifactId}</name>
    <packaging>jar</packaging>
    <url>${site.top.url}/${path.in.reactor}</url>
    <description>jGuru Codestyle: Definitions (JAR, version ${project.version})</description>
    <inceptionYear>2018</inceptionYear>

    <organization>
        <name>jGuru Europe AB</name>
        <url>https://www.jguru.se/</url>
    </organization>

    <licenses>
        <license>
            <name>jGuru Europe Corporate Source License, based on The Apache Software License, Version 2.0</name>
            <url>https://www.jguru.se/licenses/jguruCorporateSourceLicense-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <properties>
        <!--
            Define the URL prefixes for Site Deployment and DistributionManagement.
            These can be overridden in sub-reactors to tailor releases to other locations.
        -->
        <reactor.name>jguru-codestyle</reactor.name>
        <path.in.reactor>codestyle</path.in.reactor>

        <!-- Kotlin constants -->
        <kotlin.version>1.6.20</kotlin.version>
        <kotlin.jvm.target>11</kotlin.jvm.target>
        <kotlin.compiler.languageVersion>1.4</kotlin.compiler.languageVersion>
        <kotlin.compiler.apiVersion>1.4</kotlin.compiler.apiVersion>
        <kotlin.plugin>jpa</kotlin.plugin>

        <!--
            Define URL prefixes used in the various URL settings of the POM.
        -->
        <github.global.server>nazgul_github</github.global.server>
        <git.repo.owner>lennartj</git.repo.owner>
        <git.repo.url.prefix>https://github.com/${git.repo.owner}</git.repo.url.prefix>
        <git.scm.url.prefix>scm:git:ssh://git@github.com/${git.repo.owner}</git.scm.url.prefix>
        <site.url.prefix>http://${git.repo.owner}.github.io</site.url.prefix>
        <site.top.url>${site.url.prefix}/${reactor.name}/Documentation/${project.version}</site.top.url>

        <scm.connection.url>scm:git:${git.repo.url.prefix}/${reactor.name}.git</scm.connection.url>
        <scm.devConnection.url>${git.scm.url.prefix}/${reactor.name}.git</scm.devConnection.url>
        <distroManagement.url>${site.top.url}/${path.in.reactor}</distroManagement.url>
        <scm.url>${git.repo.url.prefix}/${reactor.name}.git</scm.url>
        <site.staging.localDirectory>/tmp/${reactor.name}</site.staging.localDirectory>

        <maven.version>3.8.4</maven.version>
        <enforcer.version>3.0.0</enforcer.version>
        <jdk.version>11</jdk.version>

        <!-- Code style properties -->
        <jandex-maven-plugin.version>1.2.2</jandex-maven-plugin.version>
        <pmd.plugin.version>3.14.0</pmd.plugin.version>
        <clover.plugin.version>4.2.1</clover.plugin.version>
        <spotbugs.plugin.version>4.2.0</spotbugs.plugin.version>
        <checkstyle.plugin.version>3.1.2</checkstyle.plugin.version>
        <checkstyle.header.java.file>codestyle/copyright/header_java.txt</checkstyle.header.java.file>
        <clean.plugin.version>3.2.0</clean.plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
        <scm.provider.version>1.12.0</scm.provider.version>

        <!-- Site plugin properties -->
        <maven-site-plugin.version>3.11.0</maven-site-plugin.version>
        <doxia-modules.version>1.8</doxia-modules.version>
        <wagon-modules.version>2.10</wagon-modules.version>
        <versions-maven-plugin.version>2.10.0</versions-maven-plugin.version>
        <jandex.version>2.4.2.Final</jandex.version>

        <!-- Include Dokka -->
        <dokka.version>1.6.10</dokka.version>
    </properties>

    <developers>
        <developer>
            <id>lj</id>
            <name>Lennart Jörelid</name>
            <email>lj@jguru.se</email>
            <roles>
                <role>Committer</role>
            </roles>
            <organization>jGuru Europe AB</organization>
            <organizationUrl>https://www.jguru.se</organizationUrl>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <!--
    ################################################
    # Section 2:  Dependency (management) settings
    ################################################
    -->
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.enforcer</groupId>
            <artifactId>enforcer-api</artifactId>
            <version>${enforcer.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
            <scope>provided</scope>
            <version>1.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.7.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.20.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!--
    ################################################
    # Section 3:  Build settings
    ################################################
    -->
    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>

        <pluginManagement>
            <plugins>

                <!--
                    Up the version of the source plugin.

                    Why:  Use a newer source plugin version.
                    Used: Only when called, typically release profile.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>

                <!--
                    Use a working version of the Maven versions plugin.
                    (TODO: Update the Codehaus versions plugin with the fine additions done by Lars.)

                    Why:  Workaround for https://jira.codehaus.org/browse/MVERSIONS-236
                    Used: Only when called.
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </plugin>

                <!--
                    Upgrade the Compiler plugin to the latest version.

                    Why:  Use the latest compiler plugin version for upwards JDK compliance.
                    Used: For compiling all source code to binaries.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>

                <!--
                    Ensure that the kotlin-maven-plugin uses the standard src/main/kotlin
                    and src/test/kotlin directories.

                    Why:  Ensures standard placement for Kotlin sources.
                    Used: Standard lifecycle, mvn compile / test-compile.
                -->
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <configuration>
                        <plugin>${kotlin.plugin}</plugin>
                        <jvmTarget>${jdk.version}</jvmTarget>
                        <languageVersion>${kotlin.compiler.languageVersion}</languageVersion>
                        <apiVersion>${kotlin.compiler.apiVersion}</apiVersion>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-noarg</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Dokka Maven Plugin provides javadoc-a-like documentation for Kotlin classes.
                -->
                <plugin>
                    <groupId>org.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <version>${dokka.version}</version>
                    <configuration>
                        <dokkaPlugins>
                            <plugin>
                                <groupId>org.jetbrains.dokka</groupId>
                                <artifactId>kotlin-as-java-plugin</artifactId>
                                <version>${dokka.version}</version>
                            </plugin>
                        </dokkaPlugins>
                        <outputDir>${project.reporting.outputDirectory}/dokka</outputDir>
                        <noStdlibLink>true</noStdlibLink>
                        <noJdkLink>true</noJdkLink>
                        <jdkVersion>8</jdkVersion>
                        <apiVersion>${kotlin.compiler.apiVersion}</apiVersion>
                        <languageVersion>${kotlin.compiler.languageVersion}</languageVersion>
                    </configuration>
                </plugin>

                <!--
                    Specify the version of the GPG plugin

                    Why:  Used to sign artifacts.
                    Used: To sign artifacts, using GPG.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!--
                    Configures the release plugin to use a custom release profile.

                    Why:  Release artifacts
                    Used: Normal lifecycle, release goal
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration combine.self="override">
                        <arguments>-Pjguru-release</arguments>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <tagNameFormat>${reactor.name}-@{project.version}</tagNameFormat>
                        <goals>deploy</goals>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>${scm.provider.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-api</artifactId>
                            <version>${scm.provider.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Defines the deploy mechanics for Maven Release.

                    Why:  Plugin used to deploy to (remote) repositories.
                    Used: In all projects; generate-resources phase.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>${scm.provider.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-api</artifactId>
                            <version>${scm.provider.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Defines the mechanics for Maven artifact installation.

                    Why:  Plugin used to copy artifacts into the local M2 repository.
                    Used: In all projects; install phase.
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                    <configuration>
                        <createChecksum>true</createChecksum>
                    </configuration>
                </plugin>

                <!--
                    Extracts dependency information from the build into a property file within the artifact.

                    Why:  Plugin used to generate a META-INF/maven/dependencies.properties file within the artifact.
                    Used: In all projects; generate-resources phase.
                -->
                <plugin>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <version>1.4.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>

            <!--
                Template to create a Jandex index.

                Why:  Create additional metadata, and be Quarkus compliant.
                Used: Default lifecycle, mvn process-classes.
            -->
            <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>${jandex-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <!--
                        To avoid problems, the Jandex jar version must match
                        the version found within the runtime used.
                        For example, this applies to the Wildfly application server.
                    -->
                    <dependency>
                        <groupId>org.jboss</groupId>
                        <artifactId>jandex</artifactId>
                        <version>${jandex.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!--
                 Ensure that the kotlin-maven-plugin uses the standard src/main/kotlin
                 and src/test/kotlin directories.

                 Why:  Ensures standard placement for Kotlin sources.
                 Used: Standard lifecycle, mvn compile / test-compile.
             -->
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>${kotlin.jvm.target}</jvmTarget>
                </configuration>
            </plugin>

            <!--
                Ensure that the compiler plugin ignores the Java directories.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <!--
                        Replacing default-compile as it is treated specially by maven
                     -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!--
                        Replacing default-testCompile as it is treated specially by maven
                     -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--
                Configures the site plugin. Its use is further documented in the site documentation itself.

                Why:  Make compile and publish the Codestyle documentation.
                Used: Site lifecycle, mvn site.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-deploy</id>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal />
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <topSiteURL>${site.url.prefix}/${reactor.name}</topSiteURL>
                    <stagingSiteURL>${site.url.prefix}/${reactor.name}</stagingSiteURL>
                    <stagingDirectory>${site.staging.localDirectory}</stagingDirectory>
                    <generateSitemap>true</generateSitemap>
                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                </configuration>
            </plugin>

            <!--

                Configures the release plugin to use a custom release profile.

                Why:  Release artifacts
                Used: Normal lifecycle, release goal
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>

            <!--
                Define OSGi bundle plugin version.

                Why:  Plugin used to generate OSGi Manifest headers in JARs.
                Used: As included in [sub]projects.
            -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>5.1.2</version>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <supportedProjectTypes>
                        <supportedProjectType>ejb</supportedProjectType>
                        <supportedProjectType>jar</supportedProjectType>
                        <supportedProjectType>bundle</supportedProjectType>
                        <supportedProjectType>war</supportedProjectType>
                        <supportedProjectType>ear</supportedProjectType>
                    </supportedProjectTypes>
                    <instructions>
                        <_consumer-policy><![CDATA[$<range;[===,+)>]]></_consumer-policy>
                        <_provider-policy><![CDATA[$<range;[===,=+)>]]></_provider-policy>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Embed-Directory>lib</Embed-Directory>
                        <Export-Package>{local-packages}</Export-Package>
                    </instructions>
                </configuration>
            </plugin>

            <!--
                Enforce not importing incorrect projects.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${enforcer.version}</version>
                <executions>
                    <execution>
                        <id>enforce-imports</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.4,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${jdk.version}</version>
                                </requireJavaVersion>
                                <bannedDependencies>
                                    <excludes combine.children="append">
                                        <exclude>org.apache.logging.log4j:log4j-core:(,2.17.0)</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!--
                Extracts dependency information from the build into a property file within the artifact.

                Why:  Plugin used to generate a META-INF/maven/dependencies.properties file within the artifact.
                Used: In all projects; generate-resources phase.
            -->
            <plugin>
                <groupId>org.apache.servicemix.tooling</groupId>
                <artifactId>depends-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-depends-file</id>
                        <goals>
                            <goal>generate-depends-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <outputDirectory>${project.build.directory}/site</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>3.1.1</version>
            </plugin>

            <!--

                Use a working version of the Maven versions plugin.

                Why:  Workaround for https://jira.codehaus.org/browse/MVERSIONS-236
                Used: Only when called.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <!--
    ################################################
    # Section 4:  External systems
    ################################################
    -->

    <!--
        Define the Continuous Build server address.
    -->
    <ciManagement>
        <system>TravisCI</system>
        <url>https://travis-ci.org/lennartj/jguru-codestyle</url>
    </ciManagement>

    <!--
        Define the issue management system.
    -->
    <issueManagement>
        <system>github</system>
        <url>https://github.com/lennartj/jguru-codestyle/issues</url>
    </issueManagement>

    <!--
        Define repository settings for Maven's deploy and release plugins.
        Move parts to settings.xml, as per recommendation within Maven specs.
    -->
    <distributionManagement>
        <repository>
            <id>ossrh-staging</id>
            <name>Sonatype OSS Nexus: Releases</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh-snapshots</id>
            <name>Sonatype OSS Nexus: Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <site>
            <id>github_site</id>
            <name>GitHub Site for jGuru Codestyle</name>
            <url>${site.top.url}/${path.in.reactor}</url>
        </site>
    </distributionManagement>

    <!--
        Define connections for Maven's VCS integration.
    -->
    <scm>
        <connection>${scm.connection.url}</connection>
        <developerConnection>${scm.devConnection.url}</developerConnection>
        <url>${scm.url}</url>
        <tag>jguru-codestyle-1.2.0</tag>
    </scm>

    <!--
    ################################################
    # Section 5:  Profiles
    ################################################
    -->
    <profiles>

        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>

            <build>
                <pluginManagement>
                    <plugins>

                        <!--
                            Dokka Maven Plugin provides javadoc-a-like documentation for Kotlin classes.
                            This plugin only works with JDK8, though, since it depends on the tools.jar
                            for its execution.
                        -->
                        <plugin>
                            <groupId>org.jetbrains.dokka</groupId>
                            <artifactId>dokka-maven-plugin</artifactId>
                            <version>${dokka.version}</version>
                            <configuration>
                                <dokkaPlugins>
                                    <plugin>
                                        <groupId>org.jetbrains.dokka</groupId>
                                        <artifactId>kotlin-as-java-plugin</artifactId>
                                        <version>${dokka.version}</version>
                                    </plugin>
                                </dokkaPlugins>
                                <outputDir>${project.reporting.outputDirectory}/dokka</outputDir>
                                <jdkVersion>8</jdkVersion>
                            </configuration>
                            <!-- dependencies>
                                <dependency>
                                    <groupId>org.sonatype.sisu</groupId>
                                    <artifactId>sisu-guice</artifactId>
                                    <version>4.2.0</version>
                                </dependency>
                            </dependencies -->
                        </plugin>
                    </plugins>
                </pluginManagement>

                <plugins>

                    <!--
                        Dokka Maven Plugin provides javadoc-a-like documentation for Kotlin classes.
                        This plugin only works with JDK8, though, since it depends on the tools.jar
                        for its execution.
                    -->
                    <plugin>
                        <groupId>org.jetbrains.dokka</groupId>
                        <artifactId>dokka-maven-plugin</artifactId>
                        <version>${dokka.version}</version>
                        <executions>
                            <execution>
                                <id>CreateJavaDocForSite</id>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>dokka</goal>
                                    <goal>javadoc</goal>
                                    <goal>javadocJar</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>IncludeJavaDocJarInRelease</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>javadocJar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>

        <!--
            Release profile for jGuru (Nazgul-component-style) reactors.
        -->
        <profile>
            <id>jguru-release</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.jetbrains.dokka</groupId>
                        <artifactId>dokka-maven-plugin</artifactId>
                        <version>${dokka.version}</version>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>dokka</goal>
                                    <goal>javadoc</goal>
                                    <goal>javadocJar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>${maven-deploy-plugin.version}</version>
                        <configuration>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>none</phase>
                            </execution>
                            <execution>
                                <id>deploy-to-repo</id>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-jar-no-fork</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>
</project>