<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright © 2022 ReSys (info@resys.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 
-->
<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>
  <artifactId>digiexpress-parent</artifactId>
  <groupId>io.digiexpress</groupId>
  <version>4.278.132</version>
  <packaging>pom</packaging>
  <inceptionYear>2015</inceptionYear>

  <organization>
    <name>Copyright 2022 ReSys OÜ</name>
  </organization>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <url>https://github.com/digiexpress-io/digiexpress-parent</url>
  <description>DigiExpress</description>
  <name>digiexpress-parent</name>

  <developers>
    <developer>
      <name>Villu Vaimets</name>
      <email>villu.vaimets@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
    <developer>
      <name>Tomi Pakarinen</name>
      <email>tomi.pakarinen@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
    <developer>
      <name>Olev Mutso</name>
      <email>olev.mutso@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
    <developer>
      <name>Jocelyn Mutso</name>
      <email>jocelyn.mutso@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
    <developer>
      <name>Vahur Krouverk</name>
      <email>vahur.krouverk@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
    <developer>
      <name>Admir Krilašević</name>
      <email>admir.krilasevic@resys.io</email>
      <organization>ReSys OÜ</organization>
      <organizationUrl>http://www.resys.io</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://github.com/digiexpress-io/digiexpress-parent.git</connection>
    <developerConnection>scm:git:https://github.com/digiexpress-io/digiexpress-parent.git</developerConnection>
    <url>http://github.com/digiexpress-io/digiexpress-parent/tree/main</url>
    <tag>HEAD</tag>
  </scm>
  <distributionManagement>
    <repository>
      <id>oss.sonatype.org</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>oss.sonatype.org</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven-pmd-plugin.version>3.21.2</maven-pmd-plugin.version>
    <maven-javadoc-plugin.version>3.6.2</maven-javadoc-plugin.version>
    <maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
    <maven-spotbugs-plugin.version>4.8.1.0</maven-spotbugs-plugin.version>
    <surefire.plugin.version>3.2.2</surefire.plugin.version>

    <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
    <cobertura.halt-on-failure>false</cobertura.halt-on-failure>
    <cobertura.total-branch-rate>1</cobertura.total-branch-rate>
    <cobertura.total-line-rate>1</cobertura.total-line-rate>

    <quarkus.container.image.group>digiexpress-io</quarkus.container.image.group>
    <quarkus.container.image.build>false</quarkus.container.image.build>
  </properties>

  <modules>
    <module>bom</module>
    <module>build-parent</module>
    <module>thena-parent</module>
    <module>hdes-parent</module>
    <module>stencil-parent</module>
    <module>eveli-parent</module>

  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <licenseName>apache_v2</licenseName>
            <licenseSets>
              <licenseSet>
                <excludes>
                  <exclude>release.version</exclude>
                  <exclude>.m2/**</exclude>
                  <exclude>**/*.g4</exclude>
                  <exclude>**/*.yml</exclude>
                  <exclude>**/*.yaml</exclude>
                  <exclude>src/test/resources/**</exclude>
                  <exclude>src/main/resources/**</exclude>
                  <exclude>**/ElbJWKSource.java</exclude>
                  <exclude>**/*.sql</exclude>
                </excludes>
              </licenseSet>
            </licenseSets>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>format</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>

    <profile>
      <id>reporting</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <version>${maven-site-plugin.version}</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>${cobertura-maven-plugin.version}</version>
            <configuration>
              <check>
                <totalBranchRate>${cobertura.total-branch-rate}</totalBranchRate>
                <totalLineRate>${cobertura.total-line-rate}</totalLineRate>
                <haltOnFailure>${cobertura.halt-on-failure}</haltOnFailure>
              </check>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>clean</goal>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>${maven-pmd-plugin.version}</version>
          </plugin>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <version>${maven-spotbugs-plugin.version}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${maven-checkstyle-plugin.version}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>checkstyle</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>

    </profile>

    <profile>
      <id>no-snapshots</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed!</message>
                    </requireReleaseDeps>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>update-license-headers</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>4.3</version>
            <executions>
              <execution>
                <goals>
                  <goal>format</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>digiexpress-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.5</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>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>2.1</version>
            <configuration>
              <generateBackupPoms>false</generateBackupPoms>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.1.3</version>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>package-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.8.0</version>
            <executions>
              <execution>
                <id>package-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>s01.oss.sonatype.org</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
            </configuration>
            <executions>
              <execution>
                <id>deploy-to-sonatype</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                  <goal>release</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>  
  </profiles>
</project>