<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.marid</groupId>
  <artifactId>marid-parent</artifactId>
  <version>0.8.6</version>
  <packaging>pom</packaging>

  <name>marid-parent</name>
  <description>Marid parent module</description>
  <url>http://sf.net/projects/marid</url>
  <inceptionYear>2020</inceptionYear>
  <organization>
    <name>MARID software development group</name>
    <url>http://marid.sf.net</url>
  </organization>
  <licenses>
    <license>
      <name>GNU Affero General Public License version 3.0</name>
      <url>http://www.gnu.org/licenses/agpl-3.0.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>dmovc</id>
      <name>Dmitry Ovchinnikov</name>
      <timezone>+3</timezone>
      <email>d.ovchinnikow@gmail.com</email>
      <roles>
        <role>Project Lead</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/MaridProject/marid-parent.git</connection>
    <developerConnection>scm:git:https://github.com/MaridProject/marid-parent.git</developerConnection>
    <url>http://sf.net/p/marid/code</url>
    <tag>marid-parent-0.8.6</tag>
  </scm>
  <issueManagement>
    <system>Tickets</system>
    <url>http://sourceforge.net/p/marid/tickets</url>
  </issueManagement>
  <distributionManagement>
    <site>
      <id>marid-web</id>
      <name>web</name>
      <url>sftp://frs.sf.net/home/project-web/marid/htdocs</url>
    </site>

    <repository>
      <id>${repo-id}</id>
      <name>${repo-name}</name>
      <url>${repo-url}</url>
    </repository>
  </distributionManagement>

  <properties>
    <project.encoding>UTF-8</project.encoding>
    <project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
    <project.reporting.outputEncoding>${project.encoding}</project.reporting.outputEncoding>

    <repo-id>sourceforge</repo-id>
    <repo-name>sourceforge</repo-name>
    <repo-url>sftp://frs.sf.net/home/frs/project/marid/repo</repo-url>

    <lineLength>120</lineLength>

    <license.licenseName>agpl_v3</license.licenseName>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <showWarnings>true</showWarnings>
            <showDeprecation>true</showDeprecation>
            <parameters>true</parameters>
            <fork>false</fork>
            <compilerArgs>
              <arg>-Xlint:unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Built-By>${project.organization.name}</Built-By>
                <Implementation-Version>${project.version}</Implementation-Version>
                <Implementation-Title>${project.description}</Implementation-Title>
                <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                <Specification-Version>${project.version}</Specification-Version>
                <Specification-Title>${project.name}</Specification-Title>
                <Specification-Vendor>${project.organization.name}</Specification-Vendor>
                <Marid-Module-Name>${project.name}</Marid-Module-Name>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
            <failOnError>false</failOnError>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
          <configuration>
            <repositoryId>${repo-id}</repositoryId>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.0.0-M1</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <goals>deploy</goals>
            <username>MaridProject</username>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>

        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.11.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.3.0</version>
          <configuration>
            <useJvmChmod>true</useJvmChmod>
            <recompressZippedFiles>false</recompressZippedFiles>
            <tarLongFileMode>posix</tarLongFileMode>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>

        <plugin>
          <artifactId>maven-toolchains-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <escapeWindowsPaths>false</escapeWindowsPaths>
            <overwrite>true</overwrite>
            <addDefaultExcludes>false</addDefaultExcludes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.13.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.9.1</version>
          <configuration>
            <locales>en</locales>
            <inputEncoding>UTF-8</inputEncoding>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
            <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.0.0-M3</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.0.0</version>
          <configuration>
            <acceptPomPackaging>false</acceptPomPackaging>
            <organizeLicensesByDependencies>true</organizeLicensesByDependencies>
            <emptyLineAfterHeader>true</emptyLineAfterHeader>
            <roots>src/main/java,src/test/java,src/development/java,src/release/java</roots>
            <canUpdateDescription>true</canUpdateDescription>
            <canUpdateLicense>true</canUpdateLicense>
            <canUpdateCopyright>true</canUpdateCopyright>
            <ignoreNoFileToScan>true</ignoreNoFileToScan>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>tidy-maven-plugin</artifactId>
          <version>1.1.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M5</version>
          <configuration>
            <forkCount>1</forkCount>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.0.0-M5</version>
          <configuration>
            <forkCount>1</forkCount>
            <reuseForks>false</reuseForks>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>2.0.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-wrapper-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
            <updateDependencies>true</updateDependencies>
            <updatePropertyVersions>true</updatePropertyVersions>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>3.3.4</version>
      </extension>

      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>3.3.4</version>
      </extension>
    </extensions>
  </build>

  <profiles>
    <profile>
      <id>nexus</id>

      <properties>
        <repo-id>ossrh</repo-id>
        <repo-name>nexus</repo-name>
        <repo-url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</repo-url>
      </properties>

      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <reactorModuleConvergence />
                    <dependencyConvergence />
                    <requireMavenVersion>
                      <version>[3.6,)</version>
                    </requireMavenVersion>
                    <requireJavaVersion>
                      <version>[11,)</version>
                    </requireJavaVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
            <executions>
              <execution>
                <id>nexus-deploy</id>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <phase>deploy</phase>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <executable>gpg2</executable>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-changes-plugin</artifactId>
            <version>2.12.1</version>
          </plugin>

          <plugin>
            <artifactId>maven-changelog-plugin</artifactId>
            <version>2.3</version>
            <executions>
              <execution>
                <goals>
                  <goal>changelog</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <releaseProfiles>release</releaseProfiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>filtered-resources</id>

      <activation>
        <file>
          <exists>src/main/filtered-resources</exists>
        </file>
      </activation>

      <build>
        <resources>
          <resource>
            <directory>src/main/filtered-resources</directory>
            <filtering>true</filtering>
          </resource>
        </resources>
      </build>
    </profile>

    <profile>
      <id>filtered-test-resources</id>

      <activation>
        <file>
          <exists>src/test/filtered-resources</exists>
        </file>
      </activation>

      <build>
        <testResources>
          <testResource>
            <directory>src/test/filtered-resources</directory>
            <filtering>true</filtering>
          </testResource>
        </testResources>
      </build>
    </profile>
  </profiles>
</project>
