<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2018 Intel Corporation and others. All rights reserved.

 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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>

  <parent>
    <groupId>org.opendaylight.mdsal</groupId>
    <artifactId>binding-parent</artifactId>
    <version>4.0.17</version>
    <relativePath>../..//mdsal/binding/binding-parent</relativePath>
  </parent>

  <groupId>org.opendaylight.neutron</groupId>
  <artifactId>project-neutron-parent</artifactId>
  <version>0.13.4</version>
  <packaging>pom</packaging>
  <!-- <name> formatting is used by autorelease to parse and notify projects on
       build failure. Please do not modify this unless you have a good reason. -->
  <name>ODL :: neutron :: ${project.artifactId}</name>

  <properties>
    <sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
    <sonar.jacoco.itReportPath>../target/jacoco-it.exec</sonar.jacoco.itReportPath>
  </properties>
  <scm>
    <connection>scm:git:ssh://git.opendaylight.org:29418/neutron.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/neutron.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.opendaylight.infrautils</groupId>
        <artifactId>infrautils-artifacts</artifactId>
        <version>1.6.4</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>mdsal-artifacts</artifactId>
        <version>1.10.4</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- NEUTRON-197: We need to enforce usage of org.glassfish:javax.json v1.0.4,
           that exact old version, because only that version includes both packages javax.json.*
           as well as org.glassfish.json.* (AND THEREFORE THE Class.forName WORKS EVEN UNDER OSGi).

           Newer releases of org.glassfish:javax.json (such as 1.1.2) have (only) the
           org.glassfish.json packages, with a dep to the separate new javax.json:javax.json-api
           which contains (only) the javax.json packages; this nicer API / Impl split packaging breaks under OSGi.

           We must also prevent Moxy from dragging along javax.json:javax.json-api
           to prevent confusing classpath duplicates on javax.json.  Moxy changed its policy from directly depending
           on org.glassfish:javax.json 1.0.4 in its 2.7.1 to depending on javax.json:javax.json-api since 2.7.3.

           The same block is copy/pasted in ../features/parent (that's the
           neutron-single-feature-parent, not to be confused with this project-neutron-parent);
           keep any changes made there, or here, in sync with each other. -->
      <dependency>
         <groupId>org.eclipse.persistence</groupId>
         <artifactId>org.eclipse.persistence.moxy</artifactId>
         <!-- This is the same version (of EclipseLink) currently used in odlparent (4.0.2);
              we just have to repeat it here because, apparently, Maven is too dumb to inherit
              the version from a dependencyManagement in a parent POM to the dependencyManagement here.
              (The alternative to repeat the exclusion below in each Neutron project is much worse.) -->
         <version>2.7.3</version>
         <exclusions>
           <exclusion>
             <groupId>javax.json</groupId>
             <artifactId>javax.json-api</artifactId>
           </exclusion>
         </exclusions>
      </dependency>
      <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.json</artifactId>
        <!-- do not touch this version, see above -->
        <version>1.0.4</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <failOnError>true</failOnError>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
