<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>me.tamkungz.codecmedia</groupId>
  <artifactId>codecmedia-cli</artifactId>
  <version>1.0.3</version>
  <packaging>jar</packaging>

  <name>CodecMedia CLI</name>
  <description>
    Command-line interface for CodecMedia (Java).
    Provides probing, validation, metadata sidecar, audio extraction, playback workflow simulation,
    and conversion routing via CLI.
  </description>
  <url>https://codecmedia.tamkungz.me/</url>

  <organization>
    <name>TamKungZ_</name>
    <url>https://www.tamkungz.me/</url>
  </organization>

  <inceptionYear>2026</inceptionYear>

  <issueManagement>
    <system>GitLab Issues</system>
    <url>https://gitlab.com/TamKungZ/codecmedia-cli/-/issues</url>
  </issueManagement>

  <ciManagement>
    <system>GitLab CI</system>
    <url>https://gitlab.com/TamKungZ/codecmedia-cli/-/pipelines</url>
  </ciManagement>

  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>tamkungz</id>
      <name>TamKungZ_</name>
      <email>kittiwut.pimpromma@gmail.com</email>
      <roles>
        <role>owner</role>
        <role>developer</role>
        <role>maintainer</role>
      </roles>
      <timezone>Asia/Bangkok</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://gitlab.com/TamKungZ/codecmedia-cli.git</connection>
    <developerConnection>scm:git:ssh://git@gitlab.com/TamKungZ/codecmedia-cli.git</developerConnection>
    <url>https://gitlab.com/TamKungZ/codecmedia-cli</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>central</id>
      <url>https://central.sonatype.com/api/v1/publisher</url>
    </repository>
  </distributionManagement>

  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputTimestamp>${maven.build.timestamp}</project.build.outputTimestamp>
    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>

    <gpg.keyname>7311416EAA9848E4</gpg.keyname>

    <project.logo.url>https://codecmedia.tamkungz.me/CodecMedia_Icon_Logo.png</project.logo.url>
    <project.full.logo.url>https://codecmedia.tamkungz.me/CodecMedia_Full_Logo.png</project.full.logo.url>

    <mainClass>me.tamkungz.codecmedia.CodecMediaCli</mainClass>

    <junit.version>6.0.2</junit.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>me.tamkungz.codecmedia</groupId>
      <artifactId>codecmedia</artifactId>
      <version>1.0.2</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.15.0</version>
        <configuration>
          <release>${maven.compiler.release}</release>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.5</version>
        <configuration>
          <useModulePath>false</useModulePath>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.5.0</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>${mainClass}</mainClass>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <Built-By>TamKungZ_</Built-By>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Title>${project.name}</Implementation-Title>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>

              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>all</shadedClassifierName>

              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>${mainClass}</mainClass>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <configuration>
          <doclint>none</doclint>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.8</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.10.0</version>
        <extensions>true</extensions>
      </plugin>

    </plugins>
  </build>

</project>
