<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>
  <artifactId>maven-root</artifactId>
  <groupId>com.hhoss</groupId>
  <version>1.0.2</version>
  <packaging>pom</packaging>
  <name>maven root pom</name>
  <description>maven root pom for hhoss project</description>
  <url>${scm.base.url}</url>
  <properties>
    <hhoss.groupId>com.hhoss</hhoss.groupId>
    <scm.base.url>https://github.com/qqoss/${project.artifactId}</scm.base.url>
    <distribution.server>https://s01.oss.sonatype.org</distribution.server>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.compile.source>11</java.compile.source>
    <java.compile.target>${java.compile.source}</java.compile.target>
    <maven.test.skip>true</maven.test.skip>
    <slf4j.version>1.7.36</slf4j.version>
    <junit.version>4.13</junit.version>
  </properties>
  <scm>
    <url>${scm.base.url}</url>
    <connection>scm:git:${scm.base.url}</connection>
    <developerConnection>scm:git:${scm.base.url}</developerConnection>
  </scm>
  <organization>
    <name>hhoss framework</name>
    <url>https://www.hhoss.com/home</url>
  </organization>
  <licenses>
    <license>
      <name>GNU General Public License, Version 3</name>
      <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>Kedgin</id>
      <name>Zheng Kedgin</name>
      <email>service@hhoss.com</email>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>${project.url}/issues</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>ossrh-releases</id>
      <name>sonatype repository to central</name>
      <url>${distribution.server}/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh-snapshots</id>
      <name>sonatype snapshot repository</name>
      <url>${distribution.server}/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.11</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <includes><include>**/*.*</include></includes>      
        <excludes><exclude>**/*.java</exclude></excludes>      
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <!-- default :  <groupId>org.apache.maven.plugins</groupId>  -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.9.0</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
            <source>${java.compile.source}</source>
            <target>${java.compile.target}</target>
            <compilerArgs>
              <arg>-Xlint:-unchecked</arg>
              <arg>-Xlint:deprecation</arg>
            </compilerArgs>
            <fork>true</fork>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <phase>package</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.3.2</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <doclint>none</doclint>
                <!--<additionalparam>-Xdoclint:none</additionalparam>-->
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.2</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Class-Path>.</Class-Path>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>2.6.6</version>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
              </goals>
              <configuration>
                <!--<outputDirectory>${project.build.directory}/bin</outputDirectory>-->
                <classifier>run</classifier>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <skip>${maven.test.skip}</skip>
            <testFailureIgnore>true</testFailureIgnore>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy nexus-staging:release</goals>
            <!--
				    <goals>deploy</goals>
            <server>deploy-maven-releases</server>
				    -->
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.0.1</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
              <configuration>
                <executable>${gpg.executable}</executable>
                <homedir>${gpg.homedir}</homedir>
                <keyname>${gpg.keyname}</keyname>
                <passphrase>${gpg.passphrase}</passphrase>
                <skip>${gpg.skip}</skip>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.7</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>${distribution.server}</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>