<?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.0.3</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>Michael Pasternak</name>
      <email>mishka8520@yahoo.com</email>
    </developer>
    <developer>
      <name>Ondra Machacek</name>
      <email>omachace@redhat.com</email>
      <organization>oVirt</organization>
      <organizationUrl>http://www.ovirt.org</organizationUrl>
    </developer>
    <developer>
      <name>Juan Hernandez</name>
      <email>juan.hernandez@redhat.com</email>
      <organization>oVirt</organization>
      <organizationUrl>http://www.ovirt.org</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://gerrit.ovirt.org/ovirt-engine-sdk-java.git</connection>
    <developerConnection>scm:git:git://gerrit.ovirt.org/ovirt-engine-sdk-java.git</developerConnection>
    <url>git://gerrit.ovirt.org/ovirt-engine-sdk-java.git</url>
    <tag>4.0.3</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.0.21</metamodel.version>
    <model.version>4.0.37</model.version>

  </properties>

  <build>
    <plugins>

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

      <!-- Configure release: -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
          <tagNameFormat>@{version}</tagNameFormat>
          <pushChanges>false</pushChanges>
        </configuration>
      </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>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile is used to generate the documentation: -->
    <profile>
      <id>document</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doclet>org.asciidoctor.Asciidoclet</doclet>
              <docletArtifact>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoclet</artifactId>
                <version>1.5.4</version>
              </docletArtifact>
              <additionalparam>
                -Xdoclint:none
                --base-dir ${project.basedir}
              </additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>

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

</project>
