<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>dev.orne</groupId>
  <artifactId>root-pom</artifactId>
  <version>1.1.1</version>
  <packaging>pom</packaging>

  <name>Orne Root POM</name>
  <description>Orne Root POM</description>
  <inceptionYear>2019</inceptionYear>
  <url>${github.page.url}</url>

  <organization>
    <name>Orne Developments</name>
    <url>https://github.com/orne-dev</url>
  </organization>
  <licenses>
    <license>
      <name>GNU General Public License (GPL) version 3.0</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>wamphiry</id>
      <name>(w) Iker Hernaez</name>
      <url>https://github.com/ihernaez</url>
    </developer>
  </developers>

  <modules>
    <module>java-root-pom</module>
    <module>archetype-pom</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    
    <maven.required.version>3.6.3</maven.required.version>
    
    <plugins.clean.version>3.5.0</plugins.clean.version>
    <plugins.help.version>3.5.1</plugins.help.version>
    <plugins.antrun.version>3.2.0</plugins.antrun.version>
    <plugins.resources.version>3.3.1</plugins.resources.version>
    <plugins.license.version>2.7.0</plugins.license.version>
    <plugins.versions.version>2.19.1</plugins.versions.version>
    <plugins.dependency.version>3.9.0</plugins.dependency.version>
    <plugins.enforcer.version>3.6.2</plugins.enforcer.version>
    <plugins.gpg.version>3.2.8</plugins.gpg.version>
    <plugins.assembly.version>3.7.1</plugins.assembly.version>
    <plugins.invoker.version>3.9.1</plugins.invoker.version>
    <plugins.install.version>3.1.4</plugins.install.version>
    <plugins.gitflow.version>1.21.0</plugins.gitflow.version>
    <plugins.deploy.version>3.1.4</plugins.deploy.version>
    <plugins.central.publishing.version>0.9.0</plugins.central.publishing.version>
    <plugins.site.version>3.21.0</plugins.site.version>
    <plugins.site.fluido.version>2.1.0</plugins.site.fluido.version>
    <plugins.project-info-reports.version>3.9.0</plugins.project-info-reports.version>
    <plugins.scm.publish.version>3.3.0</plugins.scm.publish.version>
    <plugins.sonar.version>5.2.0.4988</plugins.sonar.version>

    <license.licenseName>gpl_v3</license.licenseName>
    <gpg.keyname>releases@orne.dev</gpg.keyname>
    <release.verify.goals>clean verify -Ppre-release</release.verify.goals>
    <release.perform.goals>clean deploy -Prelease</release.perform.goals>
    <hotfix.verify.goals>clean verify -Ppre-release</hotfix.verify.goals>
    <hotfix.perform.goals>clean deploy -Prelease</hotfix.perform.goals>

    <enforcer.dependencies.excludes>${project.groupId}:*</enforcer.dependencies.excludes>

    <github.namespace.id>orne-dev</github.namespace.id>
    <github.project.id>maven-root</github.project.id>
    <github.project.url>https://github.com/${github.namespace.id}/${github.project.id}/</github.project.url>
    <github.page.url>https://${github.namespace.id}.github.io/${github.project.id}/</github.page.url>
    <github.scm.url>${github.project.url}tree/master</github.scm.url>
    <github.scm.connection>scm:git:https://github.com/${github.namespace.id}/${github.project.id}.git</github.scm.connection>
    <github.scm.connection.dev>scm:git:ssh://git@github.com:${github.namespace.id}/${github.project.id}.git</github.scm.connection.dev>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.organization>orne-dev</sonar.organization>
    <sonar.projectKey>orne-dev_maven-root</sonar.projectKey>
    <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
  </properties>

  <build>
    <defaultGoal>clean verify</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${plugins.clean.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>${plugins.help.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${plugins.antrun.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${plugins.resources.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${plugins.license.version}</version>
          <configuration>
            <licenseName>${license.licenseName}</licenseName>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${plugins.versions.version}</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
            <updateMatchingVersions>true</updateMatchingVersions>
            <processAllModules>true</processAllModules>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${plugins.dependency.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${plugins.enforcer.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${plugins.gpg.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${plugins.assembly.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>${plugins.invoker.version}</version>
          <configuration>
            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
            <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
            <goals>clean verify</goals>
            <profiles>it</profiles>
            <streamLogsOnFailures>false</streamLogsOnFailures>
          </configuration>
          <executions>
            <execution>
              <id>install-integration-test-artifacts</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>install</goal>
              </goals>
            </execution>
            <execution>
              <id>invoke-integration-test</id>
              <phase>integration-test</phase>
              <goals>
                <goal>integration-test</goal>
              </goals>
            </execution>
            <execution>
              <id>verify-integration-test</id>
              <phase>verify</phase>
              <goals>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${plugins.install.version}</version>
        </plugin>
        <plugin>
          <groupId>com.amashchenko.maven.plugin</groupId>
          <artifactId>gitflow-maven-plugin</artifactId>
          <version>${plugins.gitflow.version}</version>
          <configuration>
            <commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
            <versionDigitToIncrement>1</versionDigitToIncrement>
            <digitsOnlyDevVersion>true</digitsOnlyDevVersion>
            <useSnapshotInRelease>true</useSnapshotInRelease>
            <useSnapshotInHotfix>true</useSnapshotInHotfix>
            <preReleaseGoals>${release.verify.goals}</preReleaseGoals>
            <postReleaseGoals>${release.perform.goals}</postReleaseGoals>
            <preHotfixGoals>${hotfix.verify.goals}</preHotfixGoals>
            <postHotfixGoals>${hotfix.perform.goals}</postHotfixGoals>
            <pushRemote>false</pushRemote>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${plugins.deploy.version}</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.central</groupId>
          <artifactId>central-publishing-maven-plugin</artifactId>
          <version>${plugins.central.publishing.version}</version>
          <extensions>true</extensions>
          <configuration>
            <publishingServerId>central</publishingServerId>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${plugins.site.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.skins</groupId>
              <artifactId>maven-fluido-skin</artifactId>
              <version>${plugins.site.fluido.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <topSiteURL>${github.page.url}</topSiteURL>
            <skipDeploy>true</skipDeploy>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${plugins.project-info-reports.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>${plugins.scm.publish.version}</version>
          <configuration>
            <pubScmUrl>${project.scm.connection}</pubScmUrl>
            <serverId>github</serverId>
            <scmBranch>gh-pages</scmBranch>
            <checkinComment>Project site version ${project.version}</checkinComment>
            <tryUpdate>true</tryUpdate>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${plugins.sonar.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven-version</id>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <fail>true</fail>
              <rules>
                <requireMavenVersion>
                  <version>${maven.required.version}</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <configuration>
          <linkOnly>true</linkOnly>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>pre-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <configuration>
              <fail>true</fail>
            </configuration>
            <executions>
              <execution>
                <id>enforce-dependency-versions</id>
                <phase>verify</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
                      <excludes>
                        <exclude>${enforcer.dependencies.excludes}</exclude>
                      </excludes>
                    </requireReleaseDeps>
                    <requireUpperBoundDeps />
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <configuration>
              <fail>true</fail>
            </configuration>
            <executions>
              <execution>
                <id>enforce-dependency-versions</id>
                <phase>verify</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
                    </requireReleaseDeps>
                    <requireUpperBoundDeps />
                  </rules>
                </configuration>
              </execution>
              <execution>
                <id>enforce-release-version</id>
                <phase>verify</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseVersion />
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>${gpg.keyname}</keyname>
                  <passphraseServerId>${gpg.keyname}</passphraseServerId>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <scm>
    <connection>${github.scm.connection}</connection>
    <developerConnection>${github.scm.connection.dev}</developerConnection>
    <url>${github.scm.url}</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>${github.project.url}issues</url>
  </issueManagement>
  <distributionManagement>
    <site>
      <id>github</id>
      <name>Github Project Pages</name>
      <url>${project.url}</url>
    </site>
  </distributionManagement>

</project>
