<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Source of units
  ~ Copyright (C) 2023.  Zen.Liu
  ~
  ~ SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0"
  ~
  ~ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  ~ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  ~
  ~ Class Path Exception
  ~ Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
  ~  As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
  -->

<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>
    <packaging>pom</packaging>
    <modules>
        <module>error</module>
        <module>processor</module>
        <module>classes</module>
        <module>codegen</module>
        <module>binary</module>
        <module>enhancer</module><module>reflect</module>
        <module>bom</module>
    </modules>


    <properties>
        <!--//region Configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.main.skip>false</maven.main.skip>
        <maven.deploy.skip>false</maven.deploy.skip>
        <maven.install.skip>false</maven.install.skip>
        <deployAtEnd>true</deployAtEnd>
        <!--//endregion -->

        <!--//region Maven Plugins -->
        <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
        <maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
        <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
        <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
        <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
        <os-maven-plugin.version>1.7.0</os-maven-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <!--//endregion -->

        <!--//region Annotation Processors -->
        <versions.lombok>1.18.24</versions.lombok>
        <versions.auto-service>1.0.1</versions.auto-service>
        <versions.jetbrains-annotations>23.0.0</versions.jetbrains-annotations>
        <versions.jackson-annotations>2.13.5</versions.jackson-annotations>
        <versions.immutables>2.9.2</versions.immutables>
        <versions.mapstruct>1.5.3.Final</versions.mapstruct>
        <versions.lombok-mapstruct>0.2.0</versions.lombok-mapstruct>
        <versions.junit5>5.9.2</versions.junit5>
        <versions.typesafe-config>1.4.2</versions.typesafe-config>
        <!--//endregion -->

        <!--//region API -->
        <versions.slf4j>2.0.6</versions.slf4j>
        <!--//endregion -->

        <!--//region Components -->
        <versions.caffeine>2.9.3</versions.caffeine>
        <versions.javapoet>1.13.0</versions.javapoet>
        <versions.byte-buddy>1.14.4</versions.byte-buddy>
        <!--//endregion -->

        <module.name>units</module.name>
    </properties>
    <dependencyManagement>
        <dependencies>
            <!--//region Processor -->
            <dependency>
                <groupId>org.immutables</groupId>
                <artifactId>bom</artifactId>
                <version>${versions.immutables}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>${versions.jetbrains-annotations}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <optional>true</optional>
                <version>${versions.lombok}</version>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${versions.mapstruct}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct</artifactId>
                <version>${versions.mapstruct}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-mapstruct-binding</artifactId>
                <version>${versions.lombok-mapstruct}</version>
                <optional>true</optional>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.auto.service</groupId>
                <artifactId>auto-service</artifactId>
                <version>${versions.auto-service}</version>
                <optional>true</optional>
            </dependency>
            <!--//endregion -->
            <!--//region API -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${versions.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${versions.jackson-annotations}</version>
            </dependency>
            <!--//endregion -->
            <!--//region Components -->
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${versions.caffeine}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${versions.byte-buddy}</version>
                <optional>true</optional>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.squareup</groupId>
                <artifactId>javapoet</artifactId>
                <version>${versions.javapoet}</version>
                <optional>true</optional>
                <scope>provided</scope>
            </dependency>
            <!--//endregion -->
            <!--//region Test -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${versions.junit5}</version>
                <scope>test</scope>
            </dependency>
            <!--//endregion -->
        </dependencies>
    </dependencyManagement>
    <profiles>
        <profile>
            <id>deploy</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <pluginManagement>
            <plugins>
                <!-- maven-compiler-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-parameters</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <!-- maven-jar-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addClasspath>false</addClasspath>
                                <!--                                <classpathPrefix>libs/</classpathPrefix>-->
                            </manifest>
                            <manifestEntries>
                                <Automatic-Module-Name>${module.name}</Automatic-Module-Name>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!-- maven-source-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludeResources>true</excludeResources>
                        <useDefaultExcludes>true</useDefaultExcludes>
                    </configuration>
                </plugin>
                <!-- maven-javadoc-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <maxmemory>1024</maxmemory>
                        <encoding>UTF-8</encoding>
                        <show>protected</show>
                        <notree>true</notree>
                        <additionalOptions>-Xdoclint:none</additionalOptions>
                    </configuration>
                </plugin>
                <!-- maven-release-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin.version}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <!-- maven-gpg-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
                <!-- nexus-staging-->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <!--//region Marker -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <!--//endregion -->
        <!--//region Processors -->
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok-mapstruct-binding</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>value</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.auto.service</groupId>
            <artifactId>auto-service</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <!--//endregion -->

        <!--//region Test -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <!--//endregion -->
    </dependencies>

   <!--//region deploy -->
    <name>Java Units</name>
    <url>https://github.com/ZenLiuCN/units</url>
    <developers>
        <developer>
            <roles>
                <role>manager</role>
                <role>developer</role>
            </roles>
            <name>Zen Liu</name>
            <email>lcz20@163.com</email>
            <organization>ZenLiu</organization>
            <organizationUrl>https://github.com/ZenLiuCN</organizationUrl>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:ZenLiuCN/units.git</connection>
        <url>scm:git:git@github.com:ZenLiuCN/units.git</url>
        <developerConnection>scm:git:git@github.com:ZenLiuCN/units.git</developerConnection>
    </scm>
    <licenses>
        <license>
            <name>GNU General Public License, version 2, with Classpath exception</name>
            <url>https://openjdk.org/legal/gplv2+ce.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

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

    <groupId>io.github.zenliucn.units</groupId>
    <artifactId>parent</artifactId>
    <version>0.0.2</version>
    <description>units parent</description>


</project>