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

  <!-- Maven model version - the version 4.0.0 is reserved for Maven 2.x+ -->
  <modelVersion>4.0.0</modelVersion>

  <!-- Project identification -->
  <groupId>org.opensmarthouse</groupId>
  <artifactId>parent</artifactId>
  <version>0.10.0</version>

  <name>OpenSmartHouse Parent</name>
  <packaging>pom</packaging>

  <!-- Information about project -->
  <description>Parent project for Java software components developed by OpenSmartHouse / Z-Smart Systems.</description>

  <url>http://opensmarthouse.org</url>
  <inceptionYear>2021</inceptionYear>

  <!-- Issue tracker -->
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/opensmarthouse/opensmarthouse-parent/issues</url>
  </issueManagement>

  <organization>
    <name>Z-Smart Systems Limited</name>
    <url>https://zsmartsystems.com</url>
  </organization>

  <licenses>
    <license>
      <name>The Eclipse Public License, Version 2.0</name>
      <url>https://www.eclipse.org/legal/epl-2.0/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/opensmarthouse/opensmarthouse-parent.git</connection>
    <developerConnection>scm:git:https://github.com/opensmarthouse/opensmarthouse-parent.git</developerConnection>
    <url>https://github.com/opensmarthouse/opensmarthouse-parent</url>
    <tag>opensmarthouse-parent-0.10.0</tag>
  </scm>

  <!-- properties -->
  <properties>
    <license.year>2021</license.year>

    <!-- This is version tag for published/public openhab packages -->
    <openhab-api.version>3.1.0</openhab-api.version>
    <opensmarthouse-api.version>${project.version}</opensmarthouse-api.version>

    <!-- Maven plugins -->
    <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
    <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
    <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
    <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
    <maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
    <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-jxr-plugin.version>3.0.0</maven-jxr-plugin.version>
    <maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-reports-plugin.version>3.0.0</maven-reports-plugin.version>
    <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
    <maven-scm-publish-plugin.version>3.0.0</maven-scm-publish-plugin.version>
    <maven-scm.version>1.11.1</maven-scm.version>
    <maven-site-plugin.version>3.8.2</maven-site-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
    <maven-wagon.version>3.2.0</maven-wagon.version>

    <license-maven-plugin.version>3.0</license-maven-plugin.version>
    <sortpom-maven-plugin.version>2.10.0</sortpom-maven-plugin.version>

    <mojohaus-buildhelper-plugin.version>3.1.0</mojohaus-buildhelper-plugin.version>
    <mojohaus-properties-plugin.version>1.0.0</mojohaus-properties-plugin.version>

    <!-- Compilation -->
    <compiler.source>11</compiler.source>
    <compiler.target>11</compiler.target>

    <bnd.version>4.3.0</bnd.version>

    <karaf.compile.version>4.3.3</karaf.compile.version>
    <karaf.tooling.version>4.3.3</karaf.tooling.version>

    <slf4j.version>1.7.21</slf4j.version>

    <!-- Build and raporting plugin properties -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <snapshot.repository-id>opensmarthouse-sonatype-snapshot</snapshot.repository-id>
    <snapshot.repository-name>OpenSmartHouse Snapshots (Sonatype)</snapshot.repository-name>
    <snapshot.repository-url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repository-url>

    <release.repository-id>opensmarthouse-sonatype-release</release.repository-id>
    <release.repository-name>OpenSmartHouse Release (Sonatype)</release.repository-name>
    <release.repository-url> https://oss.sonatype.org/service/local/staging/deploy/maven2</release.repository-url>
  </properties>

  <!-- Repositories -->
  <distributionManagement>
    <repository>
      <id>${release.repository-id}</id>
      <url>${release.repository-url}</url>
      <name>${release.repository-name}</name>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>${snapshot.repository-id}</id>
      <url>${snapshot.repository-url}</url>
      <name>${snapshot.repository-name}</name>
    </snapshotRepository>
  </distributionManagement>

  <developers>
    <developer>
      <id>cdjackson</id>
      <name>Chris Jackson</name>
      <organization>Z-Smart Systems Limited</organization>
      <organizationUrl>https://zsmartsystems.com</organizationUrl>
      <email>chris@zsmartsystems.com</email>
    </developer>
  </developers>

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-scm</artifactId>
        <version>${maven-wagon.version}</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http</artifactId>
        <version>${maven-wagon.version}</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>${maven-wagon.version}</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-manager-plexus</artifactId>
        <version>${maven-scm.version}</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>${maven-scm.version}</version>
      </extension>
    </extensions>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
          <configuration>
            <gpgArguments>
              <arg>--digest-algo=SHA512</arg>
            </gpgArguments>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <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-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <configuration>
            <skipDeploy>true</skipDeploy>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${mojohaus-buildhelper-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>${mojohaus-properties-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${compiler.source}</source>
          <target>${compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <configuration>
              <includePom>true</includePom>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
          <outputEncoding>${project.build.sourceEncoding}</outputEncoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-reports-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
          <docletArtifact>
            <groupId>org.umlgraph</groupId>
            <artifactId>umlgraph</artifactId>
            <version>5.6.6</version>
          </docletArtifact>
          <additionalparam>-views</additionalparam>
          <useStandardDocletOptions>true</useStandardDocletOptions>
        </configuration>
        <reportSets>
          <reportSet>
            <id>default</id>
            <inherited>true</inherited>
            <reports>
              <report>aggregate-no-fork</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>true</inherited>
            <reports>
              <report>aggregate-no-fork</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven-jxr-plugin.version}</version>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </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>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>site</id>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>stage-for-scm-publish</id>
                <phase>post-site</phase>
                <goals>
                  <goal>stage</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>
              <checkoutDirectory>${project.basedir}/github.com</checkoutDirectory>
              <checkinComment>Updated site for ${project.version}</checkinComment>
              <content>target/staging</content>
              <pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
              <scmBranch>master</scmBranch>
            </configuration>
            <executions>
              <execution>
                <id>scm-publish</id>
                <phase>site-deploy</phase>
                <goals>
                  <goal>publish-scm</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


  <repositories>
    <repository>
      <id>openhab-releases</id>
      <name>openhab-releases</name>
      <url>https://openhab.jfrog.io/openhab/libs-release</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>openhab-snapshots</id>
      <name>openhab-snapshots</name>
      <url>https://openhab.jfrog.io/openhab/libs-snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>openhab-releases</id>
      <name>openhab-releases</name>
      <url>https://openhab.jfrog.io/openhab/libs-release</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>openhab-snapshots</id>
      <name>openhab-snapshots</name>
      <url>https://openhab.jfrog.io/openhab/libs-snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

</project>