<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Hibernate Infra - Asciidoctor extensions
  ~
  ~ License: Apache License, Version 2.0
  ~ See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
  -->
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.hibernate.infra</groupId>
    <artifactId>hibernate-asciidoctor-extensions</artifactId>
    <version>3.0.6.Final</version>
    <packaging>jar</packaging>

    <name>Hibernate Asciidoctor extensions</name>
    <description>
        Additional Asciidoctor extensions used by the Hibernate projects.
    </description>
    <url>http://hibernate.org</url>

    <organization>
        <name>Hibernate</name>
        <url>http://www.hibernate.org</url>
    </organization>

    <developers>
        <developer>
            <id>sannegrinovero</id>
            <name>Sanne Grinovero</name>
            <email>sanne@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/sanne-grinovero/</url>
        </developer>
        <developer>
            <id>guillaume.smet</id>
            <name>Guillaume Smet</name>
            <email>guillaume@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/guillaume-smet/</url>
        </developer>
        <developer>
            <id>marko.bekhta</id>
            <name>Marko Bekhta</name>
            <email>marko.prykladna@gmail.com</email>
            <url>http://in.relation.to/marko-bekhta/</url>
        </developer>
        <developer>
            <id>yoann.rodiere</id>
            <name>Yoann Rodière</name>
            <email>yoann@hibernate.org</email>
            <organization>Red Hat, Inc.</organization>
            <url>http://in.relation.to/yoann-rodiere/</url>
        </developer>
    </developers>

    <properties>
        <jdk.min.version>17</jdk.min.version>
        <maven.min.version>3.9.8</maven.min.version>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <asciidoctorj.version>3.0.0</asciidoctorj.version>
        <junit.version>4.13.2</junit.version>
        <jsoup.version>1.18.1</jsoup.version>
        <assertj.version>3.26.3</assertj.version>

        <!-- Run mvn wrapper:wrapper when updating the wrapper plugin version -->
        <maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.10.0</maven-javadoc-plugin.version>
        <license-maven-plugin.version>4.5</license-maven-plugin.version>
        <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
        <version.gpg.plugin>3.2.5</version.gpg.plugin>
        <version.nexus-staging.plugin>1.7.0</version.nexus-staging.plugin>

        <gpg.sign.skip>true</gpg.sign.skip>
        <deploy.skip>true</deploy.skip>

        <!-- Repository Deployment URLs -->
        <ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>
        <ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</ossrh.releases.repo.url>
        <ossrh.releases.repo.baseUrl>https://oss.sonatype.org/</ossrh.releases.repo.baseUrl>
        <ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>
        <ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>${asciidoctorj.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>${jsoup.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-wrapper-plugin</artifactId>
                <version>${maven-wrapper-plugin.version}</version>
                <configuration>
                    <mavenVersion>${maven.min.version}</mavenVersion>
                    <distributionType>bin</distributionType>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin.version}</version>
                <configuration>
                    <header>${project.basedir}/src/main/resources/license.header</header>
                    <strictCheck>true</strictCheck>
                    <headerDefinitions>
                        <headerDefinition>${project.basedir}/src/main/resources/java-header-style.xml</headerDefinition>
                        <headerDefinition>${project.basedir}/src/main/resources/xml-header-style.xml</headerDefinition>
                    </headerDefinitions>
                    <mapping>
                        <java>JAVA_CLASS_STYLE</java>
                        <xml>XML_FILE_STYLE</xml>
                    </mapping>
                    <includes>
                        <include>**/*.java</include>
                        <include>**/*.xml</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>license-headers</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${version.enforcer.plugin}</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[${jdk.min.version},)</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>${maven.min.version}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${version.gpg.plugin}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <skip>${gpg.sign.skip}</skip>
                            <homedir>${env.RELEASE_GPG_HOMEDIR}</homedir>
                            <bestPractices>true</bestPractices>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${version.nexus-staging.plugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo>
                    <serverId>${ossrh.releases.repo.id}</serverId>
                    <!-- The following, by default, is only used for actual releases, not for snapshot deployments -->
                    <nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl>
                    <!-- oss.sonatype.org has been very slow when closing repositories lately;
                         let's raise the timeout until we switch to s01.sonatype.org -->
                    <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <gpg.sign.skip>false</gpg.sign.skip>
                <deploy.skip>false</deploy.skip>
            </properties>
        </profile>
    </profiles>

    <inceptionYear>2017</inceptionYear>

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

    <scm>
        <connection>scm:git:git://github.com/hibernate/hibernate-asciidoctor-extensions.git</connection>
        <developerConnection>scm:git:git@github.com:hibernate/hibernate-asciidoctor-extensions.git</developerConnection>
        <url>http://github.com/hibernate/hibernate-asciidoctor-extensions</url>
        <tag>HEAD</tag>
    </scm>

    <ciManagement>
        <system>Jenkins</system>
        <url>http://ci.hibernate.org/</url>
    </ciManagement>

    <distributionManagement>
        <repository>
            <id>${ossrh.releases.repo.id}</id>
            <name>OSSRH Releases Repository</name>
            <url>${ossrh.releases.repo.url}</url>
        </repository>
        <snapshotRepository>
            <id>${ossrh.snapshots.repo.id}</id>
            <name>OSSRH Snapshots Repository</name>
            <url>${ossrh.snapshots.repo.url}</url>
        </snapshotRepository>
    </distributionManagement>

</project>
