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

<!--
Copyright (c) 2016 Red Hat, Inc.

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

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.ovirt.engine.api</groupId>
  <artifactId>java-sdk-parent</artifactId>
  <packaging>pom</packaging>
  <version>4.6.0</version>

  <name>oVirt Java SDK Parent</name>
  <description>This package contains the Java SDK for version 4 of the oVirt Engine API.</description>
  <url>http://www.ovirt.org</url>

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

  <developers>
    <developer>
      <name>oVirt Developers</name>
      <email>devel@ovirt.org</email>
      <organization>oVirt</organization>
      <organizationUrl>http://www.ovirt.org</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/oVirt/ovirt-engine-sdk-java.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/oVirt/ovirt-engine-sdk-java.git</developerConnection>
    <url>https://github.com/oVirt/ovirt-engine-sdk-java.git</url>
    <tag>4.6.0</tag>
  </scm>

  <properties>

    <!-- Make sure that we always compile with UTF-8 encoding: -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Version of the metamodel and model used to generate the SDK: -->
    <metamodel.version>1.3.11</metamodel.version>
    <model.version>4.6.1</model.version>

    <!-- Dependencies -->
    <commons-cli.version>1.3</commons-cli.version>
    <commons-io.version>2.7</commons-io.version>
    <httpclient.version>4.5.13</httpclient.version>
    <httpcore.version>4.4.14</httpcore.version>
    <jackson.version>2.18.2</jackson.version>
    <junit.version>4.13.1</junit.version>
    <slf4j.version>1.7.7</slf4j.version>
    <undertow.version>2.2.25.Final</undertow.version>
    <weld-se.version>3.1.9.Final</weld-se.version>
    <maven-release-plugin.version>2.5.2</maven-release-plugin.version>
    <maven-source-plugin.version>2.4</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
    <jakarta-enterprise.version>4.0.1</jakarta-enterprise.version>

  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.ovirt.engine.api</groupId>
        <artifactId>metamodel-concepts</artifactId>
        <version>${metamodel.version}</version>
      </dependency>

      <dependency>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>jakarta.enterprise.cdi-api</artifactId>
        <version>${jakarta-enterprise.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.ovirt.engine.api</groupId>
        <artifactId>metamodel-analyzer</artifactId>
        <version>${metamodel.version}</version>
      </dependency>

      <dependency>
        <groupId>org.ovirt.engine.api</groupId>
        <artifactId>metamodel-tool</artifactId>
        <version>${metamodel.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>${commons-cli.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-core</artifactId>
        <version>${undertow.version}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpclient.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>${httpcore.version}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.weld.se</groupId>
        <artifactId>weld-se-shaded</artifactId>
        <version>${weld-se.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>

      <!-- Attach the sources: -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Configure release: -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <configuration>
          <tagNameFormat>@{version}</tagNameFormat>
          <pushChanges>false</pushChanges>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${central-publishing-maven-plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <doclint>none</doclint>
          <release>11</release>
        </configuration>
          <executions>
           <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <!-- This profile is used to sign the artifacts when performing
         releases. -->
    <profile>
      <id>sign</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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <modules>
    <module>generator</module>
    <module>sdk</module>
  </modules>

</project>
