<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/**
 * Copyright (c) Codice Foundation
 *
 * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or any later version. 
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at
 * <http://www.gnu.org/licenses/lgpl.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>ddf.catalog.core</groupId>
        <artifactId>catalog-core-impl</artifactId>
        <version>2.30.0</version>
    </parent>
    <artifactId>ddf-pubsub</artifactId>
    <name>DDF :: Catalog :: Core :: Impl :: PubSub</name>
    <packaging>bundle</packaging>
    <dependencies>
        <dependency>
            <groupId>ddf.catalog.core</groupId>
            <artifactId>catalog-core-api-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.measure</groupId>
            <artifactId>measure-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.catalog.core</groupId>
            <artifactId>catalog-core-commons</artifactId>
            <!-- There is a conflict between geotools (specifically gt-xsd-filter)
                and jscience. Since commons-json does not directly depend on jscience, rather
                it calls methods in commons-ddf that use jscience, we can add an exclusion
                stanza here to omit the transitive jscience dependency from the commons-ddf
                dependency and resolve its conflict with geotools. -->
            <exclusions>
                <exclusion>
                    <groupId>org.jscience</groupId>
                    <artifactId>jscience</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.classic.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.cmpn</artifactId>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-mock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.geotools.xsd</groupId>
            <artifactId>gt-xsd-gml3</artifactId>
            <version>${org.geotools.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Export mock objects in test JAR for use by other projects -->
            <!--
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <executions>
                  <execution>
                      <goals>
                          <goal>test-jar</goal>
                      </goals>
                  </execution>
              </executions>
            </plugin>
            -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Export-Package>
                            ddf.catalog.pubsub;version="${project.version}"
                        </Export-Package>
                        <Private-Package>
                            ddf.catalog.pubsub.internal.*,
                            ddf.catalog.pubsub.criteria.*,
                            ddf.catalog.pubsub.predicate,
                            ddf.catalog.operation.impl,
                            ddf.catalog.data.impl.*,
                            ddf.catalog.util.impl,
                            ddf.catalog.filter.impl,
                            org.codice.ddf.platform.util
                        </Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <haltOnFailure>true</haltOnFailure>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.54</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.46</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.39</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
