<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~     Copyright (c) 2020-2021 Siroshun09
  ~
  ~     This file is part of Event4J.
  ~
  ~     Permission is hereby granted, free of charge, to any person obtaining a copy
  ~     of this software and associated documentation files (the "Software"), to deal
  ~     in the Software without restriction, including without limitation the rights
  ~     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~     copies of the Software, and to permit persons to whom the Software is
  ~     furnished to do so, subject to the following conditions:
  ~
  ~     The above copyright notice and this permission notice shall be included in all
  ~     copies or substantial portions of the Software.
  ~
  ~     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~     SOFTWARE.
  -->

<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>com.github.siroshun09.event4j</groupId>
    <artifactId>event4j</artifactId>
    <version>2.0.0</version>
    <packaging>jar</packaging>

    <name>Event4J</name>
    <url>https://github.com/Siroshun09/Event4J</url>
    <description>An event library for Java.</description>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Siroshun09</name>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/Siroshun09/Event4J.git</connection>
        <developerConnection>scm:git@github.com:Siroshun09/Event4J.git</developerConnection>
        <url>https://github.com/Siroshun09/Event4J</url>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/Siroshun09/Event4J/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/Siroshun09/Event4J/runs</url>
    </ciManagement>

    <properties>
        <project.charset>UTF-8</project.charset>
        <java.version>11</java.version>
        <project.build.sourceEncoding>${project.charset}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.charset}</project.reporting.outputEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>20.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.7.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.7.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>sign</id>
            <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>
        <profile>
            <id>ossrh</id>
            <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>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.charset}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive combine.children="append">
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <Automatic-Module-Name>${project.groupId}</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-docs</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <author>true</author>
                    <source>${java.version}</source>
                    <charset>${project.charset}</charset>
                    <encoding>${project.charset}</encoding>
                    <docencoding>${project.charset}</docencoding>
                    <linksource>true</linksource>
                    <locale>en_US</locale>
                    <notimestamp>true</notimestamp>
                    <show>protected</show>
                    <bottom>
                        <![CDATA[<p class="legalCopy">Copyright &#169;2020-2021 <a href="https://github.com/Siroshun09">Siroshun09</a>. All rights reserved.</p>]]></bottom>
                    <links>
                        <link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
                    </links>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>