<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * 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.jaxb</groupId>
        <artifactId>ddf-jaxb-reactor</artifactId>
        <version>1.0.1</version>
    </parent>

    <artifactId>spatial-csw-schema-bindings</artifactId>
    <name>DDF :: Spatial :: CSW :: Schema Bindings</name>

    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>${jvnet.jaxb2.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>${jaxb.version}</version>
            <scope>provided</scope>
        </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>
            <version>${ogc-filter-v_1_1_0-schema.thirdparty.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <catalog>src/main/resources/catalog.xml</catalog>
                            <schemaIncludes>
                                <value>csw/*/CSW-publication.xsd</value>
                                <value>gml/*/base/gml.xsd</value>
                            </schemaIncludes>
                            <episodes>
                                <episode>
                                    <groupId>org.jvnet.ogc</groupId>
                                    <artifactId>gml-v_3_1_1-schema</artifactId>
                                </episode>
                                <episode>
                                    <groupId>org.codice.thirdparty</groupId>
                                    <artifactId>ogc-filter-v_1_1_0-schema</artifactId>
                                </episode>
                                <episode>
                                    <groupId>org.jvnet.ogc</groupId>
                                    <artifactId>ows-v_1_0_0-schema</artifactId>
                                </episode>
                            </episodes>
                            <strict>false</strict>
                            <extension>true</extension>
                            <args>
                                <arg>-XtoString</arg>
                                <arg>-Xequals</arg>
                                <arg>-XhashCode</arg>
                                <arg>-Xcopyable</arg>
                                <arg>-Xmergeable</arg>
                                <arg>-Xsetters</arg>
                                <arg>-Xwildcard</arg>
                                <arg>-Xinject-code</arg>
                                <arg>-Xinheritance</arg>
                            </args>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <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-source-plugin</artifactId>
            </plugin>
            <!-- Replaced antrun deletion of directories with compiler excludes.
             Need to exclude several generated classes from the compile phase -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/net/opengis/ows/*/*.java</exclude>
                        <exclude>**/net/opengis/ogc/*.java</exclude>
                        <exclude>**/net/opengis/filter/*/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>