<?xml version="1.0"?>
<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.eportfolium.karuta</groupId>
    <artifactId>karuta-frontend</artifactId>
    <version>3.2.1</version>
    <packaging>war</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>The server file part of the Karuta project</description>
    <url>https://www.eportfolium.com</url>

    <organization>
        <name>ePortfolium</name>
        <url>https://www.eportfolium.com</url>
    </organization>

    <licenses>
        <license>
            <name>Educational Community License version 2.0 ("ECL")</name>
            <url>https://spdx.org/licenses/ECL-2.0.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Nobry OUK</name>
            <organization>ePortfolium</organization>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:ssh://git@github.com/karutaproject/karuta-frontend.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/karutaproject/karuta-frontend.git</developerConnection>
        <url>https://github.com/karutaproject/karuta-frontend.git</url>
        <tag>karuta-frontend-3.2.1</tag>
    </scm>

    <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>

    <properties>
        <build.timestamp>${maven.build.timestamp}</build.timestamp>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <sourceDirectory>${basedir}/src</sourceDirectory>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <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-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.2</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>./WebContent</directory>
                            <includes>
                                <include>META-INF/*</include>
                                <include>application/**</include>
                                <include>karuta/**</include>
                                <include>other/**</include>
                                <include>favicon.ico</include>
                                <include>index.htm</include>
                                <include>documentation.htm</include>
                                <include>exported.js</include>
                                <include>report_bootstrap.html</include>
                            </includes>
                            <excludes>
                                <exclude>**/target/*</exclude>
                                <exclude>karuta/js/version.js</exclude>
                            </excludes>
                        </resource>
                        <resource>
                            <directory>./WebContent</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>karuta/js/version.js</include>
                            </includes>
                        </resource>
                    </webResources>
                    <archive>
                        <manifest>
                            <addDefaultEntries>true</addDefaultEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <!-- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>-->
                        </manifest>
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                            <Built-By>${user.name}</Built-By>
                            <Build-Java>${java.version}</Build-Java>
                            <Build-OS>${os.name}</Build-OS>
                            <Build-Maven>Maven ${maven.version}</Build-Maven>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <wtpversion>2.0</wtpversion>
                </configuration>
            </plugin>
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0-M6</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <localCheckout>true</localCheckout>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <pushChanges>true</pushChanges>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>releases</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </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://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
    </build>
<!--    <profiles>
        <profile>
            <id>releases</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <skipStaging>true</skipStaging>
                            Set this to true and the release will automatically proceed and sync to Central Repository will follow
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles> -->
</project>
