<?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.transformer</groupId>
        <artifactId>transformer</artifactId>
        <version>2.30.0</version>
    </parent>
    <artifactId>catalog-transformer-xml</artifactId>
    <packaging>bundle</packaging>
    <name>DDF :: Catalog :: Transformer :: XML</name>
    <dependencies>
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>${jts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geotools.xsd</groupId>
            <artifactId>gt-xsd-gml3</artifactId>
            <version>${org.geotools.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.soc</groupId>
            <artifactId>ogc-tools-gml-jts</artifactId>
            <version>${ogc-tools-gml-jts.version}</version>
        </dependency>
        <dependency>
            <groupId>ddf.catalog.core</groupId>
            <artifactId>catalog-core-api-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.platform</groupId>
            <artifactId>platform-parser-xml</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ddf.catalog.core</groupId>
            <artifactId>catalog-core-commons</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>0.6.0</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>
        </dependency>
        <dependency>
            <groupId>ddf.jaxb</groupId>
            <artifactId>catalog-transformer-xml-binding</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.platform.util</groupId>
            <artifactId>platform-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>${saxon.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Embed-Dependency>
                            ogc-tools-gml-jts,
                            catalog-transformer-xml-binding,
                            jaxb2-basics-runtime,
                            gml-v_3_1_1-schema;inline=true,
                            commons-lang3
                        </Embed-Dependency>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Private-Package>
                            ddf.catalog.transformer.xml,
                            ddf.catalog.transformer.xml.adapter,
                            ddf.catalog.transformer.thread,
                            ddf.catalog.data.impl.*,
                            ddf.catalog.operation.impl,
                            ddf.catalog.filter.impl,
                            ddf.catalog.util.impl
                        </Private-Package>
                        <Export-Package>
                            ddf.catalog.transformer.api
                        </Export-Package>
                    </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>2.8_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.61</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.50</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.42</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>1.10.1</version>
                <configuration>
                    <testResultsTimestamp>false</testResultsTimestamp>
                    <overrideRootLogLevel>DEBUG</overrideRootLogLevel>
                    <suppressJMeterOutput>false</suppressJMeterOutput>
                    <ignoreResultFailures>true</ignoreResultFailures>
                    <testFilesIncluded>
                        <testFilesIncluded>XMLTransformerPerformance.jmx</testFilesIncluded>
                    </testFilesIncluded>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>kg.apc</groupId>
                        <artifactId>jmeter-plugins</artifactId>
                        <version>1.0.0</version>
                        <exclusions>
                            <!--
                               Unfortunately some transitive dependencies cannot be found on mvncentral
                               and we have to explicitly exclude them.
                               For a complete list, see https://github.com/mlex/jmeter-maven-example/
                           -->
                            <exclusion>
                                <groupId>kg.apc</groupId>
                                <artifactId>perfmon</artifactId>
                            </exclusion>
                            <!-- ... -->
                            <!--
                                Because of a bug in the jmeter-maven-plugin (see
                                https://github.com/Ronnie76er/jmeter-maven-plugin/issues/77) we have to
                                exclude jmeter dependencies here, too.
                            -->
                            <exclusion>
                                <groupId>org.apache.jmeter</groupId>
                                <artifactId>jorphan</artifactId>
                            </exclusion>
                            <!-- ... -->
                        </exclusions>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>de.codecentric</groupId>
                <artifactId>jmeter-graph-maven-plugin</artifactId>
                <version>0.1.0</version>
                <configuration>
                    <inputFile>${project.build.directory}/jmeter/results/XMLTransformerPerformance.jtl</inputFile>
                    <graphs>
                        <!-- ... you can declare more <graph>-elements here -->
                        <graph>
                            <pluginType>BytesThroughputOverTime</pluginType>
                            <width>800</width>
                            <height>600</height>
                            <outputFile>${project.build.directory}/jmeter/results/XMLTransformerPerformance2-bytes.png</outputFile>
                        </graph>
                        <graph>
                            <pluginType>ThroughputVsThreads</pluginType>
                            <width>800</width>
                            <height>600</height>
                            <outputFile>${project.build.directory}/jmeter/results/XMLTransformerPerformance2-thruvthreads.png</outputFile>
                        </graph>
                        <graph>
                            <pluginType>TimesVsThreads</pluginType>
                            <width>800</width>
                            <height>600</height>
                            <outputFile>${project.build.directory}/jmeter/results/XMLTransformerPerformance2-timevthreads.png</outputFile>
                        </graph>
                    </graphs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
