<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2021 - Yupiik SAS - https://www.yupiik.com
  ~ Licensed 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 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>io.yupiik.logging</groupId>
  <artifactId>yupiik-logging</artifactId>
  <name>Yupiik Logging</name>
  <version>1.0.2</version>
  <packaging>pom</packaging>
  <description>Yupiik Logging support</description>
  <url>https://www.yupiik.com/</url>

  <properties>
    <minisite.github-pages.skip>true</minisite.github-pages.skip>
  </properties>

  <modules>
    <module>yupiik-logging-jul</module>
    <module>integration-test</module>
  </modules>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.7.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.30</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>11</source>
          <target>11</target>
          <release>11</release>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M5</version>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0-M1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <skipIfEmpty>false</skipIfEmpty>
          <excludes>
            <exclude>**/.mkdir</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>11</source>
          <doclint>none</doclint>
        </configuration>
      </plugin>
      <plugin><!--  mvn ossindex:audit -->
        <groupId>org.sonatype.ossindex.maven</groupId>
        <artifactId>ossindex-maven-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>audit-dependencies</id>
            <phase />
            <goals>
              <goal>audit</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scope>compile,runtime</scope>
        </configuration>
      </plugin>
      <plugin>
        <!--
        render doc locally in a build:
        $ mvn yupiik-tools:minisite@doc -N

        work on the doc:
        $ mvn yupiik-tools:serve-minisite@doc -N

        deploy on github pages (clean is important to ensure we don't start from a dirty gh-pages copy):
        $ mvn clean yupiik-tools:minisite@doc -N -Dminisite.github-pages.skip=false
        -->
        <groupId>io.yupiik.maven</groupId>
        <artifactId>yupiik-tools-maven-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <id>doc</id>
            <phase>none</phase>
            <goals>
              <goal>minisite</goal>
            </goals>
            <configuration>
              <logoText>Logging</logoText>
              <copyright>Yupiik &amp;copy; / Logging</copyright>
              <indexSubTitle>The Yupiik logging helper library.</indexSubTitle>
              <siteBase>https://yupiik.github.io/yupiik-logging</siteBase>
              <target>${project.build.directory}/${project.artifactId}</target>
              <git>
                <ignore>${minisite.github-pages.skip}</ignore>
              </git>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>3.0</version>
        <executions>
          <execution>
            <id>check-license</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <inherited>false</inherited>
        <configuration>
          <aggregate>true</aggregate>
          <header>${maven.multiModuleProjectDirectory}/src/license/header.txt</header>
          <headerDefinitions>
            <headerDefinition>${maven.multiModuleProjectDirectory}/src/license/header_format.xml
            </headerDefinition>
          </headerDefinitions>
          <properties>
            <organization.name>Yupiik SAS</organization.name>
            <organization.url>https://www.yupiik.com</organization.url>
            <year>2021</year>
          </properties>
          <mapping>
            <adoc>DOUBLESLASH_STYLE</adoc>
          </mapping>
          <excludes>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.xlsx</exclude>
            <exclude>**/*.idea</exclude>
            <exclude>LICENSE</exclude>
            <exclude>**/target/**</exclude>
            <exclude>**/src/license/**</exclude>
            <exclude>**/generated/**</exclude>
            <exclude>**/*.gitkeep</exclude>
            <exclude>**/*.html</exclude>
            <exclude>**/*.slim</exclude>
            <exclude>**/*.xslt</exclude>
            <exclude>**/minisite/**</exclude>
            <exclude>**/.m2/**</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <skip.it>true</skip.it>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://github.com/yupiik/yupiik-logging/blob/master/LICENSE</url>
      <distribution>may be downloaded from the Maven repository</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Romain Manni-Bucau</name>
      <id>rmannibucau</id>
      <roles>
        <role>Contributor</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <name>Francois Papon</name>
      <id>fpapon</id>
      <roles>
        <role>Contributor</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/yupiik/yupiik-logging.git</connection>
    <developerConnection>scm:git:https://github.com/yupiik/yupiik-logging.git</developerConnection>
    <url>https://github.com/yupiik/yupiik-logging.git</url>
    <tag>yupiik-logging-1.0.2</tag>
  </scm>

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