<?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>se.bjurr.maven</groupId>
  <artifactId>bjurr-maven-parent</artifactId>
  <version>1.1.6</version>
  <packaging>pom</packaging>
  <name>Bjurr Maven</name>
  <description>My Maven.</description>
  <url>https://github.com/tomasbjerre/bjurr-maven</url>
  <inceptionYear>2025</inceptionYear>

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

  <developers>
    <developer>
      <id>tomasbjerre</id>
      <name>Tomas Bjerre</name>
      <email>tomas.bjerre85@gmail.com</email>
      <url>https://github.com/tomasbjerre</url>
    </developer>
  </developers>

  <modules>
    <module>bjurr-maven-plugin-parent</module>
  </modules>

  <scm>
    <developerConnection>scm:git:git@github.com:tomasbjerre/bjurr-maven.git</developerConnection>
    <tag>bjurr-maven-parent-1.1.6</tag>
    <url>https://github.com/tomasbjerre/bjurr-maven</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <properties>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.parameters>true</maven.compiler.parameters>

    <!-- Dependency Versions -->
    <assertj.version>4.0.0-M1</assertj.version>
    <spotbugs.annotations.version>4.9.3</spotbugs.annotations.version>

    <!-- Plugin Versions -->
    <sortpom.version>4.0.0</sortpom.version>
    <surefire.version>3.5.3</surefire.version>
    <eclipse.version>2.10</eclipse.version>
    <javadoc.version>3.11.2</javadoc.version>
    <source.plugin.version>3.3.1</source.plugin.version>
    <release.plugin.version>3.1.1</release.plugin.version>
    <central.publishing.version>0.8.0</central.publishing.version>
    <changelog.version>2.2.10</changelog.version>
    <fmt.version>2.27</fmt.version>
    <spotbugs.version>4.9.3.2</spotbugs.version>
    <pmd.version>3.27.0</pmd.version>
    <checkstyle.version>3.6.0</checkstyle.version>
    <violations.version>2.2.8</violations.version>
    <gpg.version>3.0.1</gpg.version>

    <!-- Other Properties -->
    <violations.maxViolations>0</violations.maxViolations>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
      <version>${spotbugs.annotations.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <version>${sortpom.version}</version>
        <configuration>
          <createBackupFile>false</createBackupFile>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>sort</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>${eclipse.version}</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.version}</version>
        <configuration>
          <attach>true</attach>
          <charset>UTF-8</charset>
          <failOnError>false</failOnError>
          <failOnWarnings>false</failOnWarnings>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${source.plugin.version}</version>
        <configuration>
          <attach>true</attach>
        </configuration>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${release.plugin.version}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>release-sign-artifacts</releaseProfiles>
          <goals>deploy</goals>
          <checkModificationExcludes>
            <checkModificationExclude>pom.xml</checkModificationExclude>
          </checkModificationExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${central.publishing.version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>ossrh</publishingServerId>
          <autoPublish>true</autoPublish>
        </configuration>
      </plugin>
      <plugin>
        <groupId>se.bjurr.gitchangelog</groupId>
        <artifactId>git-changelog-maven-plugin</artifactId>
        <version>${changelog.version}</version>
        <configuration>
          <updatePomWithCurrentSemanticVersionSuffixSnapshot>true</updatePomWithCurrentSemanticVersionSuffixSnapshot>
          <updatePomWithCurrentSemanticVersionSuffixSnapshotIfNotTagged>false</updatePomWithCurrentSemanticVersionSuffixSnapshotIfNotTagged>
          <readableTagName>.*-(.*)$</readableTagName>
          <ignoreCommitsIfMessageMatches>^\[maven-release-plugin\].*|^Merge.*</ignoreCommitsIfMessageMatches>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>${fmt.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs.version}</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <failOnError>false</failOnError>
        </configuration>
        <executions>
          <execution>
            <id>spotbugs</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${pmd.version}</version>
        <configuration>
          <failOnViolation>false</failOnViolation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.version}</version>
        <configuration>
          <failOnViolation>false</failOnViolation>
          <failsOnError>false</failsOnError>
        </configuration>
      </plugin>
      <plugin>
        <groupId>se.bjurr.violations</groupId>
        <artifactId>violations-maven-plugin</artifactId>
        <version>${violations.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>violations</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <minSeverity>INFO</minSeverity>
              <detailLevel>VERBOSE</detailLevel>
              <maxViolations>${violations.maxViolations}</maxViolations>
              <printViolations>true</printViolations>
              <violations>
                <violation>
                  <parser>FINDBUGS</parser>
                  <reporter>Findbugs</reporter>
                  <folder>.</folder>
                  <pattern>.*/findbugs/.*\.xml$</pattern>
                </violation>
                <violation>
                  <parser>FINDBUGS</parser>
                  <reporter>Spotbugs</reporter>
                  <folder>.</folder>
                  <pattern>.*/spotbugsXml.*\.xml$</pattern>
                </violation>
                <violation>
                  <parser>PMD</parser>
                  <reporter>PMD</reporter>
                  <folder>.</folder>
                  <pattern>.*/pmd/.*\.xml$</pattern>
                </violation>
                <violation>
                  <parser>CHECKSTYLE</parser>
                  <reporter>Checkstyle</reporter>
                  <folder>.</folder>
                  <pattern>.*/checkstyle/.*\.xml$</pattern>
                </violation>
              </violations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${gpg.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
