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

<!--
Copyright (c) 2015 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>metamodel-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.2.2</version>

  <name>oVirt API Metamodel Parent</name>

  <description>
    Model management tools for the oVirt Engine API.
  </description>

  <url>http://www.ovirt.org</url>

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

  <developers>
    <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-api-metamodel.git</connection>
    <developerConnection>scm:git:git://gerrit.ovirt.org/ovirt-engine-api-metamodel.git</developerConnection>
    <url>git://gerrit.ovirt.org/ovirt-engine-api-metamodel.git</url>
    <tag>1.2.2</tag>
  </scm>

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

  <modules>
    <module>analyzer</module>
    <module>annotations</module>
    <module>concepts</module>
    <module>runtime</module>
    <module>server</module>
    <module>tests</module>
    <module>tool</module>
  </modules>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.json</artifactId>
        <version>1.0.3</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.7</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.7</version>
      </dependency>

      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>

        <!-- Make sure we use Java 8. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>

        <!-- Attach sources during the package phase, so that if there is
             generated source code it will be included as well. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      </plugins>
    </pluginManagement>

    <plugins>

      <!-- Create and attach JBoss modules, for all child projects: -->
      <plugin>
        <groupId>org.ovirt.maven.plugins</groupId>
        <artifactId>ovirt-jboss-modules-maven-plugin</artifactId>
        <version>2.0.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>attach-modules</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <category>common</category>
        </configuration>
      </plugin>

      <!-- Run findbugs in all the projects with a explicit list
           of exclussions: -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.3</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <xmlOutputDirectory>target/site</xmlOutputDirectory>
          <excludeFilterFile>${project.basedir}/exclude-filters.xml</excludeFilterFile>
        </configuration>
      </plugin>

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

      <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>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
      </plugin>

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

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

  </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>

</project>
