<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2014-2024 Philip Helger (www.helger.com)
    philip[at]helger[dot]com

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.helger.schematron</groupId>
    <artifactId>ph-schematron-parent-pom</artifactId>
    <version>8.0.5</version>
  </parent>
  <artifactId>ph-schematron-api</artifactId>
  <packaging>bundle</packaging>
  <name>ph-schematron-api</name>
  <description>Base API for the library for validating XML documents with Schematron</description>
  <url>https://github.com/phax/ph-schematron/ph-schematron-api</url>
  <inceptionYear>2014</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Philip Helger</name>
    <url>https://www.helger.com</url>
  </organization>

  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
      <url>https://www.helger.com</url>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-jaxb</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.xsd</groupId>
      <artifactId>ph-xsds-xml</artifactId>
    </dependency>
    <!-- Saxon is required! - does not work with integrated JAXP nor with Xalan 2.7.1! -->
    <dependency>
      <groupId>net.sf.saxon</groupId>
      <artifactId>Saxon-HE</artifactId>
    </dependency>
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Automatic-Module-Name>com.helger.schematron</Automatic-Module-Name>
            <Export-Package>
              com.helger.schematron,
              com.helger.schematron.api.xslt,
              com.helger.schematron.api.xslt.validator,
              com.helger.schematron.config,
              com.helger.schematron.resolve,
              com.helger.schematron.saxon,
              com.helger.schematron.svrl,
              com.helger.schematron.svrl.jaxb
            </Export-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)",
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)",
osgi.serviceloader; filter:="(osgi.serviceloader=com.helger.schematron.svrl.ISVRLLocationBeautifierSPI)"; cardinality:=multiple; resolution:=optional</Require-Capability>
            <Provide-Capability>osgi.serviceloader; osgi.serviceloader=com.helger.commons.thirdparty.IThirdPartyModuleProviderSPI</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>${jaxb-plugin.group}</groupId>
        <artifactId>${jaxb-plugin.artifact}</artifactId>
        <version>${jaxb-plugin.version}</version>
        <executions>
          <execution>
            <id>svrl</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <bindingDirectory>${basedir}/src/main/jaxb</bindingDirectory>
              <bindingIncludes>
                <bindingInclude>binding.xjb</bindingInclude>
              </bindingIncludes>
              <schemaDirectory>${basedir}/src/main/resources/external/schemas</schemaDirectory>
              <schemaIncludes>
                <schemaInclude>svrl.xsd</schemaInclude>
              </schemaIncludes>
              <catalog>${basedir}/src/main/jaxb/catalog.txt</catalog>
              <generateDirectory>${project.build.directory}/generated-sources/svrl</generateDirectory>
              <staleFile>${project.build.directory}/stale/.stale-svrl</staleFile>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <extension>true</extension>
          <strict>false</strict>
          <args>
            <arg>-no-header</arg>
            <arg>-Xph-default-locale</arg>
            <arg>en_US</arg>
            <arg>-Xph-annotate</arg>
            <arg>-Xph-fields-private</arg>
            <arg>-Xph-code-quality</arg>
            <arg>-Xph-implements</arg>
            <arg>java.io.Serializable</arg>
            <arg>-Xph-equalshashcode</arg>
            <arg>-Xph-tostring</arg>
            <arg>-Xph-list-extension</arg>
            <arg>-Xph-csu</arg>
            <arg>-Xph-cloneable2</arg>
            <arg>-Xph-value-extender</arg>
            <arg>-Xph-offset-dt-extension</arg>
          </args>
          <episodes>
            <episode>
              <groupId>com.helger.xsd</groupId>
              <artifactId>ph-xsds-xml</artifactId>
            </episode>
          </episodes>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.helger</groupId>
            <artifactId>ph-jaxb-plugin</artifactId>
            <version>${ph-jaxb-plugin.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>
