<?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>org.codice.ddf.spatial</groupId>
        <artifactId>csw</artifactId>
        <version>2.29.31</version>
    </parent>
    <packaging>bundle</packaging>
    <artifactId>spatial-csw-schema-bindings</artifactId>
    <!--<version>1.1.0_1</version>-->
    <name>DDF :: Spatial :: CSW :: Schema Bindings</name>
    <description>Provides JAXB 2.x bindings for OGC CSW Schema (Version 2.0.2).</description>
    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>ddf.jaxb</groupId>
            <artifactId>spatial-csw-schema-bindings</artifactId>
            <version>${ddf.jaxb.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jvnet.ogc</groupId>
            <artifactId>gml-v_3_1_1-schema</artifactId>
            <version>${gml-v_3_1_1-schema.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.jvnet.ogc</groupId>
            <artifactId>ows-v_1_0_0-schema</artifactId>
            <version>${ows-v_1_0_0-schema.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.codice.thirdparty</groupId>
            <artifactId>ogc-filter-v_1_1_0-schema</artifactId>
            <scope>compile</scope>
        </dependency>
    </dependencies>
    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Export-Package>
                            net.opengis.cat.csw.v_2_0_2.dc.elements,
                            net.opengis.cat.csw.v_2_0_2.dc.terms,
                            net.opengis.cat.csw.v_2_0_2,
                            net.opengis.filter.v_1_1_0,
                            net.opengis.ows.v_1_0_0,
                            net.opengis.gml.v_3_1_1
                        </Export-Package>
                        <Embed-Dependency>
                            gml-v_3_1_1-schema,
                            ows-v_1_0_0-schema,
                            ogc-filter-v_1_1_0-schema,
                            jaxb2-basics-runtime,
                            spatial-csw-schema-bindings
                        </Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-artifact-size</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <ArtifactSizeEnforcerRule implementation="org.codice.maven.artifactsize.ArtifactSizeEnforcerRule">
                                    <maxArtifactSize>4.2_MB</maxArtifactSize>
                                </ArtifactSizeEnforcerRule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </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</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
