<?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>com.labun.buildnumber</groupId>
    <artifactId>jgit-buildnumber-parent</artifactId>
    <version>2.7.0</version>

    <packaging>pom</packaging>
    <name>JGit Build Number for Maven, Ant, and Gradle</name>
    <description>Extracts Git metadata and a freely composable build number in pure Java without Git command-line tool. Eclipse m2e compatible.</description>
    <url>https://github.com/elab/jgit-buildnumber</url>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/elab/jgit-buildnumber</url>
        <connection>scm:git:https://github.com/elab/jgit-buildnumber.git</connection>
        <developerConnection>scm:git:https://github.com/elab/jgit-buildnumber.git</developerConnection>
        <tag>2.7.0</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <name>Eugen Labun</name>
            <email>labun@gmx.net</email>
            <url>https://github.com/elab</url>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Alex Kasko</name>
            <email>mail@alexkasko.com</email>
            <url>http://alexkasko.com</url>
        </contributor>
        <contributor>
            <name>Peter Levart</name>
            <url>https://github.com/plevart</url>
        </contributor>
        <contributor>
            <name>Brad Szabo</name>
            <url>https://github.com/bradszabo</url>
        </contributor>
        <contributor>
            <name>George Thomas</name>
            <url>https://github.com/smoothreggae</url>
        </contributor>
        <contributor>
            <name>Elliot Wolk</name>
            <url>https://github.com/teleshoes</url>
        </contributor>
        <contributor>
            <name>Mikhail Kopylov</name>
            <url>https://github.com/mih-kopylov</url>
        </contributor>
        <contributor>
            <name>Rick Osborne</name>
            <url>https://github.com/rickosborne</url>
        </contributor>
        <contributor>
            <name>Austin Doupnik</name>
            <email>austin.doupnik@bina.roche.com</email>
            <url>https://github.com/binalabs</url>
        </contributor>
        <contributor>
            <name>Andreas Kuhtz</name>
            <email>andreas.kuhtz@gmail.com</email>
            <url>https://github.com/akuhtz</url>
        </contributor>
    </contributors>

    <modules>
        <module>jgit-buildnumber-common</module>
        <module>jgit-buildnumber-maven-plugin</module>
        <module>jgit-buildnumber-ant-task</module>
        <module>jgit-buildnumber-gradle-plugin</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!--
        To support Lombok in Eclipse, add this to eclipse.ini:
            -vmargs
            -javaagent:<path-to-lombok-jar>
        For other IDEs and tools, see projectlombok.org/setup
        -->
        <lombok.version>1.18.24</lombok.version>
        <!-- note: jgit 6 requires java 11 -->
        <jgit.version>5.13.0.202109080827-r</jgit.version>
        <junit.version>5.8.2</junit.version>
        <logback.version>1.2.11</logback.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>production</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <doclint>none</doclint>
                                    <linksource>true</linksource>
                                    <quiet>true</quiet>
                                </configuration>
                            </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>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
                <!-- https://stackoverflow.com/questions/38547239/maven-plugin-plugindescriptor-goal-fails-at-the-and-of-file -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.6.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.9.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <releaseProfiles>production</releaseProfiles>
                        <providerImplementations>
                            <git>jgit</git>
                        </providerImplementations>
                        <pushChanges>false</pushChanges>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                        <localCheckout>true</localCheckout>
                        <useReleaseProfile>false</useReleaseProfile>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-api</artifactId>
                            <version>1.12.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-jgit</artifactId>
                            <version>1.12.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>