<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>ch.usi.si.seart</groupId>
  <artifactId>jcloc</artifactId>
  <version>0.1.0</version>
  <packaging>jar</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>Java wrapper for CLOC</description>
  <url>https://github.com/seart-group/jcloc</url>
  <inceptionYear>2024</inceptionYear>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://raw.githubusercontent.com/seart-group/jcloc/master/LICENSE</url>
    </license>
  </licenses>

  <organization>
    <name>SEART</name>
    <url>https://seart.si.usi.ch/</url>
  </organization>

  <developers>
    <developer>
      <id>dabico</id>
      <name>Ozren Dabić</name>
      <url>https://dabico.github.io/</url>
      <email>ozren.dabic@usi.ch</email>
      <organization>SEART</organization>
      <organizationUrl>https://seart.si.usi.ch/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <tag>v0.1.0</tag>
    <url>https://github.com/seart-group/jcloc/tree/master</url>
    <connection>scm:git:https://github.com/seart-group/jcloc.git</connection>
    <developerConnection>scm:git:git@github.com:seart-group/jcloc.git</developerConnection>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/seart-group/jcloc/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>8</java.version>
    <org.codehaus.plexus.version>4.0.1</org.codehaus.plexus.version>
    <org.jetbrains.annotations.version>24.1.0</org.jetbrains.annotations.version>
    <org.junit.version>5.10.3</org.junit.version>
    <com.fasterxml.jackson.version>2.17.2</com.fasterxml.jackson.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${org.junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${com.fasterxml.jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>${org.codehaus.plexus.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>${org.jetbrains.annotations.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>${project.basedir}/cloc</directory>
        <includes>
          <include>cloc</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.4.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.3.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>${java.version}</version>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>3.0.0</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
        <configuration>
          <release>${java.version}</release>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.8.0</version>
        <executions>
          <execution>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <show>public</show>
          <quiet>true</quiet>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.3.1</version>
        <configuration>
          <parallel>classes</parallel>
          <threadCount>4</threadCount>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <releaseProfiles>release</releaseProfiles>
          <preparationProfiles>release</preparationProfiles>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <preparationGoals>
            resources:copy-resources@default-generate-docs scm:add -Dincludes=README.md
          </preparationGoals>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <configLocation>checkstyle.xml</configLocation>
              <includeTestSourceDirectory>false</includeTestSourceDirectory>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>4.9.10</version>
        <executions>
          <execution>
            <goals>
              <goal>revision</goal>
            </goals>
            <configuration>
              <commitIdGenerationMode>full</commitIdGenerationMode>
              <generateGitPropertiesFile>true</generateGitPropertiesFile>
              <generateGitPropertiesFilename>
                ${project.build.outputDirectory}/git.properties
              </generateGitPropertiesFilename>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>ch.usi.si.seart</groupId>
        <artifactId>git-submodule-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>update</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>default-generate-docs</id>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <encoding>${project.build.sourceEncoding}</encoding>
                  <outputDirectory>${project.basedir}</outputDirectory>
                  <escapeString>\</escapeString>
                  <resources>
                    <resource>
                      <directory>doc</directory>
                      <includes>
                        <include>README.md</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
