<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.opendaylight.odlparent</groupId>
    <artifactId>odlparent</artifactId>
    <version>1.5.0-Lithium</version>
    <relativePath>../../odlparent/odlparent</relativePath>
  </parent>

  <groupId>org.opendaylight.persistence</groupId>
  <artifactId>persistence.project</artifactId>
  <packaging>pom</packaging>
  <version>1.0.0-Lithium</version>

  <prerequisites>
    <maven>3.0.4</maven>
  </prerequisites>

  <properties>
    <generated.sources.location>target/src-generated</generated.sources.location>

    <!-- Versions -->

    <!-- Dependencies -->

    <easymock.version>3.0</easymock.version>
    <jscience.version>4.3.1</jscience.version>
    <hsqldb.version>2.0.0</hsqldb.version>
    <hibernate.version>4.1.11.Final</hibernate.version>
    <eclipselink.version>2.5.0</eclipselink.version>
    <sqlite-jdbc.version>3.8.7</sqlite-jdbc.version>

    <!-- ODL Dependencies -->

    <yangtools.version>0.7.0-Lithium</yangtools.version>
    <mdsal.version>1.3.0-Lithium</mdsal.version>
    <configfile.directory>etc/opendaylight/karaf</configfile.directory>

    <!-- Plugins -->

    <hibernate-jpamodelgen.version>1.2.0.Final</hibernate-jpamodelgen.version>
    <hibernate3-maven-plugin.version>3.0</hibernate3-maven-plugin.version>
    <maven-replacer-plugin.version>1.4.1</maven-replacer-plugin.version>


    <!-- Sonar config -->
    <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
    <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>${easymock.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>${jsr305.api.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jscience</groupId>
      <artifactId>jscience</artifactId>
      <version>${jscience.version}</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compile.plugin.version}</version>
          <configuration>
            <source>${java.version.source}</source>
            <target>${java.version.target}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${maven.bundle.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <configuration>
          <includes>
            <include>org.opendaylight.persistence.*</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <id>pre-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-test</id>
            <goals>
              <goal>report</goal>
            </goals>
            <phase>test</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!--
          This plugin is used to insert @SuppressWarnings("all") in generated sources.
        -->
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>maven-replacer-plugin</artifactId>
        <version>${maven-replacer-plugin.version}</version>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>replace</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>${generated.sources.location}/**/*.java</include>
          </includes>
          <regex>true</regex>
          <regexFlags>
            <regexFlag>MULTILINE</regexFlag>
          </regexFlags>
          <replacements>
            <replacement>
              <token>^public class</token>
              <value>@SuppressWarnings("all") public class</value>
            </replacement>
            <replacement>
              <token>^public abstract class</token>
              <value>@SuppressWarnings("all") public abstract class</value>
            </replacement>
          </replacements>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <scm>
    <connection>scm:git:ssh://git.opendaylight.org:29418/persistence.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/persistence.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://wiki.opendaylight.org/view/Persistence:Main</url>
  </scm>

</project>
