<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.szgabsz91</groupId>
    <artifactId>npm-maven-extension-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Parent POM of the npm-maven-extension and npm-maven-plugin projects</description>

    <url>https://github.com/szgabsz91/npm-maven-extension</url>
    <inceptionYear>2017</inceptionYear>

    <properties>
        <java.version>18</java.version>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>3.4.1</maven-project-info-reports-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <spotbugs-maven-plugin.version>4.7.3.0</spotbugs-maven-plugin.version>
        <maven-pmd-plugin.version>3.19.0</maven-pmd-plugin.version>
        <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <maven-scm-publish-plugin.version>3.1.0</maven-scm-publish-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs-maven-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>${maven-scm-publish-plugin.version}</version>
                <configuration>
                    <pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>npm-maven-extension-@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs-maven-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>extension</module>
        <module>plugin</module>
    </modules>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>szgabsz91</id>
            <name>Gabor Szabo</name>
            <email>szgabsz91@gmail.com</email>
        </developer>
    </developers>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/szgabsz91/npm-maven-extension/issues</url>
    </issueManagement>

    <ciManagement>
        <system>CircleCI</system>
        <url>https://app.circleci.com/pipelines/github/szgabsz91/npm-maven-extension</url>
    </ciManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>maven-central</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>maven-central</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <site>
            <id>site</id>
            <name>Github Pages</name>
            <url>scm:git:https://github.com/szgabsz91/npm-maven-extension.git</url>
        </site>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/szgabsz91/npm-maven-extension.git</connection>
        <developerConnection>scm:git:https://github.com/szgabsz91/npm-maven-extension.git</developerConnection>
        <url>https://github.com/szgabsz91/npm-maven-extension</url>
        <tag>npm-maven-extension-1.0.0</tag>
    </scm>

</project>
