<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>io.fluxzero</groupId>
  <artifactId>lychee-maven-plugin</artifactId>
  <version>0.2.0</version>
  <packaging>maven-plugin</packaging>

  <name>Lychee Maven Plugin</name>
  <description>
    Maven plugin for checking documentation links with lychee. It downloads the lychee binary for the current
    platform, verifies release checksums for official downloads, and scans configured documentation directories.
  </description>
  <url>https://github.com/fluxzero-io/lychee-maven-plugin</url>

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

  <developers>
    <developer>
      <id>jeroenbruinink</id>
      <name>Jeroen Bruinink</name>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/fluxzero-io/lychee-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:fluxzero-io/lychee-maven-plugin.git</developerConnection>
    <url>https://github.com/fluxzero-io/lychee-maven-plugin</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputTimestamp>2026-02-23T00:00:00Z</project.build.outputTimestamp>
    <maven.compiler.release>17</maven.compiler.release>
    <maven.plugin.api.version>3.9.16</maven.plugin.api.version>
    <maven.plugin.annotations.version>3.15.2</maven.plugin.annotations.version>
    <maven.plugin.plugin.version>3.15.2</maven.plugin.plugin.version>
    <maven.plugin.report.plugin.version>3.15.2</maven.plugin.report.plugin.version>
    <maven.site.plugin.version>3.22.0</maven.site.plugin.version>
    <maven.surefire.plugin.version>3.5.6</maven.surefire.plugin.version>
    <maven.invoker.plugin.version>3.10.1</maven.invoker.plugin.version>
    <maven.enforcer.plugin.version>3.6.3</maven.enforcer.plugin.version>
    <maven.source.plugin.version>3.4.0</maven.source.plugin.version>
    <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
    <maven.gpg.plugin.version>3.2.8</maven.gpg.plugin.version>
    <cyclonedx.maven.plugin.version>2.9.1</cyclonedx.maven.plugin.version>
    <central.publishing.plugin.version>0.11.0</central.publishing.plugin.version>
    <junit.version>6.1.0</junit.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.plugin.api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.plugin.api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings</artifactId>
      <version>${maven.plugin.api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven.plugin.annotations.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>4.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.28.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>file-management</artifactId>
      <version>3.2.0</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven.plugin.plugin.version}</version>
        <configuration>
          <goalPrefix>lychee</goalPrefix>
        </configuration>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven.enforcer.plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-build-prereqs</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.9.0,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[17,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven.invoker.plugin.version}</version>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
          <projectsDirectory>${project.basedir}/src/it</projectsDirectory>
          <pomIncludes>
            <pomInclude>*/pom.xml</pomInclude>
          </pomIncludes>
          <goals>
            <goal>verify</goal>
          </goals>
          <streamLogs>true</streamLogs>
          <showErrors>true</showErrors>
          <postBuildHookScript>verify</postBuildHookScript>
          <filterProperties>
            <plugin.groupId>${project.groupId}</plugin.groupId>
            <plugin.artifactId>${project.artifactId}</plugin.artifactId>
            <plugin.version>${project.version}</plugin.version>
          </filterProperties>
        </configuration>
        <executions>
          <execution>
            <id>invoker-install</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>install</goal>
            </goals>
          </execution>
          <execution>
            <id>invoker-run</id>
            <phase>integration-test</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven.site.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
        <version>${cyclonedx.maven.plugin.version}</version>
        <executions>
          <execution>
            <id>make-sbom</id>
            <phase>verify</phase>
            <goals>
              <goal>makeBom</goal>
            </goals>
            <configuration>
              <outputFormat>all</outputFormat>
              <schemaVersion>1.6</schemaVersion>
              <includeBomSerialNumber>true</includeBomSerialNumber>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-report-plugin</artifactId>
        <version>${maven.plugin.report.plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.9.0</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven.source.plugin.version}</version>
            <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>
            <version>${maven.javadoc.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <bestPractices>true</bestPractices>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>${central.publishing.plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
