<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2020 - 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.maven</groupId>
  <artifactId>yupiik-tools-maven-plugin-parent</artifactId>
  <version>1.0.21</version>
  <packaging>pom</packaging>
  <name>Yupiik Tools Maven Plugin</name>
  <description>Yupiik Tools</description>
  <url>https://www.yupiik.com/</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <mvn.version>3.6.3</mvn.version>
    <jruby.version>9.3.1.0</jruby.version>
    <asciidoctor-revealjs.version>4.0.1</asciidoctor-revealjs.version>
    <asciidoctor-bespoke.version>1.0.0.alpha.1</asciidoctor-bespoke.version>
    <jgit.version>5.10.0.202012080955-r</jgit.version>
    <johnzon.version>1.2.10</johnzon.version>
  </properties>

  <modules>
    <module>yupiik-tools-maven-plugin</module>
    <module>minisite-core</module>
    <module>yupiik-tools-common</module>
    <module>slides-core</module>
    <module>yupiik-tools-cli</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>2.4.1</version>
        <exclusions>
          <exclusion>
            <groupId>org.jruby</groupId>
            <artifactId>jruby</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj-diagram</artifactId>
        <version>2.0.2</version>
      </dependency>
      <dependency>
        <groupId>org.jruby</groupId>
        <artifactId>jruby-complete</artifactId>
        <version>${jruby.version}</version>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj-pdf</artifactId>
        <version>1.5.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jsonb_1.0_spec</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-json_1.1_spec</artifactId>
        <version>1.5</version>
      </dependency>
      <dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-jsonb</artifactId>
        <version>${johnzon.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.16</version>
      <scope>provided</scope>
    </dependency>

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

  <scm>
    <connection>scm:git:https://github.com/yupiik/tools-maven-plugin.git</connection>
    <developerConnection>scm:git:https://github.com/yupiik/tools-maven-plugin.git</developerConnection>
    <url>https://github.com/yupiik/tools-maven-plugin.git</url>
    <tag>yupiik-tools-maven-plugin-parent-1.0.21</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>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://github.com/yupiik/tools-maven-plugin/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>

  <build>
    <extensions>
      <extension>
        <groupId>org.torquebox.mojo</groupId>
        <artifactId>mavengem-wagon</artifactId>
        <version>1.0.3</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.0.0</version>
      </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>
          <parameters>true</parameters>
        </configuration>
      </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-release-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>release</releaseProfiles>
        </configuration>
      </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.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>
        <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-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.8.2</version>
      </plugin>

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>4.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>
          <inlineHeader><![CDATA[Copyright (c) ${year} - ${organization.name} - ${organization.url}
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.
]]></inlineHeader>
          <properties>
            <organization.name>Yupiik SAS</organization.name>
            <organization.url>https://www.yupiik.com</organization.url>
            <year>2020</year>
          </properties>
          <mapping>
            <adoc>DOUBLESLASH_STYLE</adoc>
            <rb>SCRIPT_STYLE</rb>
          </mapping>
          <excludes>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.xlsx</exclude>
            <exclude>**/*.idea</exclude>
            <exclude>**/*.adoc</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>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <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>

  <repositories>
    <repository>
      <id>mavengems</id>
      <url>http://rubygems-proxy.torquebox.org/releases/</url>
    </repository>
  </repositories>
</project>
