<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>cn.nasuma</groupId>
  <artifactId>SunoKit</artifactId>
  <version>2.0.0</version>
  <packaging>pom</packaging>
  <name>SunoKit</name>
  <url>https://github.com/NasumaNC/SunoKit</url>
  <modules>
    <module>core</module>
    <module>common</module>
  </modules>

  <description>SunoKit core lib</description>


  <developers>
    <developer>
      <id>xireli000</id>
      <name>xireli</name>
      <roles>
        <role>Project Manager</role>
        <role>Developer</role>
      </roles>
      <email>nasuma@nasuma.email</email>
      <url>https://github.com/NasumaNC/SunoKit</url>
    </developer>
  </developers>

  <inceptionYear>2025</inceptionYear>

  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/NasumaNC/SunoKit.git</connection>
    <developerConnection>scm:git:git@github.com:NasumaNC/SunoKit.git</developerConnection>
    <url>https://github.com/NasumaNC/SunoKit.git</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <base-version>2.0.0</base-version>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
      </plugin>
      <!-- Source -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.1.0</version>
        <inherited>true</inherited>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludeResources>true</excludeResources>
          <useDefaultExcludes>true</useDefaultExcludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.2</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <failOnError>false</failOnError> <!-- 配置不因 Javadoc 错误导致构建失败 -->
            </configuration>
          </plugin>
          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <!-- 改成你自己的路径 -->
              <keyname>NasumaNC@gmail.com</keyname>
              <executable>/usr/local/bin/gpg</executable>
            </configuration>
            <executions>
              <execution>
                <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.4.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>SunoKit-NasumaNC</publishingServerId>
              <tokenAuth>true</tokenAuth>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>sonatype-nexus-staging</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>sonatype-nexus-snapshots</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>

</project>
