<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>cn.sliew</groupId>
  <artifactId>carp-parent</artifactId>
  <version>0.0.64</version>
  <packaging>pom</packaging>
  <name>carp-parent</name>
  <description>Carp Parent</description>
  <url>https://github.com/flowerfine/carp-parent</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>kalencaya</name>
      <email>1942460489@qq.com</email>
    </developer>
  </developers>
  <modules>
    <module>carp-dependencies</module>
    <module>carp-spring-boot-parent</module>
    <module>carp-framework</module>
  </modules>
  <scm>
    <connection>git@github.com:flowerfine/carp-parent.git</connection>
    <developerConnection>scm:git:git@github.com:flowerfine/carp-parent.git</developerConnection>
    <url>https://github.com/flowerfine/carp-parent</url>
  </scm>
  <issueManagement>
    <system>Github Issue</system>
    <url>https://github.com/flowerfine/carp-parent/issues</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus</id>
      <name>Sonatype Nexus Release</name>
      <url>https://central.sonatype.org</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://central.sonatype.org</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    <scala.binary.version>2.12</scala.binary.version>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <java.version>17</java.version>
    <maven.test.skip>true</maven.test.skip>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.deploy.skip>false</maven.deploy.skip>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
    <revision>0.0.64</revision>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <java>
            <removeUnusedImports />
            <licenseHeader>
              <file>tools/spotless/license-header</file>
            </licenseHeader>
          </java>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>${flatten-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>oss-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <charset>${project.build.sourceEncoding}</charset>
              <encoding>${project.build.sourceEncoding}</encoding>
              <docencoding>${project.build.sourceEncoding}</docencoding>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-remote-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>process-resource-bundles</id>
                <goals>
                  <goal>process</goal>
                </goals>
                <configuration>
                  <resourceBundles>
                    <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                  </resourceBundles>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>sonatype-nexus</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>uploaded</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
