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

    Copyright (c) 2020 - present - 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.2.3</version>
  <packaging>pom</packaging>
  <name>Yupiik Tools</name>
  <description>Yupiik Tools</description>
  <url>https://www.yupiik.com/</url>

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

    <fusion.version>1.0.14</fusion.version>
    <mvn.version>3.6.3</mvn.version>
    <jruby.version>9.3.6.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>6.8.0.202311291450-r</jgit.version>
    <johnzon.version>1.2.21</johnzon.version>
    <uship.version>1.0.9</uship.version>

    <node.environment>production</node.environment>
  </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>
    <module>html-versioning-injector</module>
    <module>codec-core</module>
    <module>ascii2svg</module>
    <module>asciidoc-java</module>
    <module>env-manager</module>
    <module>_documentation</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.26.0</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.16.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.15.1</version>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>2.5.2</version>
        <exclusions>
          <exclusion>
            <groupId>org.jruby</groupId>
            <artifactId>jruby</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj-diagram</artifactId>
        <version>2.2.3</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.6.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-core</artifactId>
        <version>${johnzon.version}</version>
        <classifier>jakarta</classifier>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-mapper</artifactId>
        <version>${johnzon.version}</version>
        <classifier>jakarta</classifier>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-jsonb</artifactId>
        <version>${johnzon.version}</version>
        <classifier>jakarta</classifier>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>

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

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.9.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.2.3</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>io.github.git-commit-id</groupId>
        <artifactId>git-commit-id-maven-plugin</artifactId>
        <version>7.0.0</version>
        <executions>
          <execution>
            <id>get-the-git-infos</id>
            <goals>
              <goal>revision</goal>
            </goals>
            <phase>initialize</phase>
          </execution>
        </executions>
        <configuration>
          <injectAllReactorProjects>true</injectAllReactorProjects>
          <includeOnlyProperties>
            <includeOnlyProperty>^git.build.time$</includeOnlyProperty>
            <includeOnlyProperty>^git.commit.id$</includeOnlyProperty>
          </includeOnlyProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>
      <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.1.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.6.3</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.13</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.2.3</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.3</version>
        <executions>
          <execution>
            <id>check-license</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <inherited>false</inherited>
        <configuration>
          <aggregate>true</aggregate>
          <properties>
            <organization.name>Yupiik SAS</organization.name>
            <organization.url>https://www.yupiik.com</organization.url>
            <year>2020 - present</year>
          </properties>
          <mapping>
            <adoc>DOUBLESLASH_STYLE</adoc>
            <rb>SCRIPT_STYLE</rb>
          </mapping>
          <licenseSets>
            <licenseSet>
              <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>
              <excludes>
                <exclude>**/*.txt</exclude>
                <exclude>**/*.xlsx</exclude>
                <exclude>**/*.idea</exclude>
                <exclude>**/*.adoc</exclude>
                <exclude>**/*.sdkmanrc</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>**/.mvn/jvm.config</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.15.0</version>
        <executions>
          <execution>
            <id>install-node-npm</id>
            <phase>generate-resources</phase>
            <inherited>false</inherited>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
              <installDirectory>${project.basedir}/.node</installDirectory>
              <nodeVersion>v20.11.0</nodeVersion>
              <npmVersion>10.2.4</npmVersion>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <installDirectory>${project.basedir}/.node</installDirectory>
          <workingDirectory>${project.basedir}/src/main/frontend</workingDirectory>
        </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>
</project>
