<?xml version="1.0" encoding="UTF-8"?>
<!--

    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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>eu.de4a</groupId>
    <artifactId>de4a-commons-parent-pom</artifactId>
    <version>0.2.3</version>
  </parent>
  <artifactId>de4a-canonical-evidences</artifactId>
  <packaging>bundle</packaging>
  <name>de4a-canonical-evidences</name>
  <url>https://github.com/de4a-wp5/de4a-commons/de4a-canonical-evidences</url>
  <inceptionYear>2021</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>de4a</name>
    <url>http://www.de4a.eu</url>
  </organization>

  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
      <url>http://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-datetime</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.peppol</groupId>
      <artifactId>peppol-id</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.xsd</groupId>
      <artifactId>ph-xsds-xmldsig</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.xsd</groupId>
      <artifactId>ph-xsds-xades132</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.xsd</groupId>
      <artifactId>ph-xsds-ccts-cct-schemamodule</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.xsd</groupId>
      <artifactId>ph-xsds-xlink</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.ubl</groupId>
      <artifactId>ph-ubl23</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.de4a</groupId>
      <artifactId>de4a-core-schemas</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- JUnit 4 for testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-genericode</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Automatic-Module-Name>eu.de4a.iem.xml</Automatic-Module-Name>
            <Export-Package>eu.de4a.iem.xml.*</Export-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
            <Provide-Capability>osgi.serviceloader; osgi.serviceloader=com.helger.schematron.svrl.ISVRLLocationBeautifierSPI</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <doclint>none</doclint>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/LICENSE</exclude>
            <exclude>**/NOTICE</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>src/main/resources/schemas/**</exclude>
            <exclude>src/test/resources/**</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.evolvedbinary.maven.jvnet</groupId>
        <artifactId>jaxb2-maven-plugin</artifactId>
        <version>0.15.0</version>
        <executions>
          <execution>
            <id>core</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <schemaIncludes>
                <schemaInclude>pilot-shared/*.xsd</schemaInclude>
                <schemaInclude>t4.1/uc1/SA-UC*.xsd</schemaInclude>
                <schemaInclude>t4.2/*.xsd</schemaInclude>
              </schemaIncludes>
              <bindingIncludes>
                <bindingInclude>bindings-pilot-shared.xjb</bindingInclude>
                <bindingInclude>bindings-t41.xjb</bindingInclude>
                <bindingInclude>bindings-t42.xjb</bindingInclude>
              </bindingIncludes>
            </configuration>
          </execution>
          <execution>
            <!-- Must be a separate execution, because of mixed CoreVocabulary 1.1 and 1.0 which share the same namespace URI! -->
            <id>t43</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <schemaIncludes>
                <schemaInclude>t4.3/*.xsd</schemaInclude>
                <schemaInclude>t4.3/v1.6b/*.xsd</schemaInclude>
              </schemaIncludes>
              <bindingIncludes>
                <bindingInclude>bindings-t43.xjb</bindingInclude>
              </bindingIncludes>
              <generateDirectory>${project.build.directory}/generated-sources/t43</generateDirectory>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <schemaDirectory>${basedir}/src/main/resources/schemas</schemaDirectory>
          <bindingDirectory>${basedir}/src/main/jaxb</bindingDirectory>
          <catalog>src/main/jaxb/catalog.txt</catalog>
          <extension>true</extension>
          <strict>false</strict>
          <verbose>false</verbose>
          <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-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-ccts-cct-schemamodule</artifactId>
            </episode>
            <episode>
              <groupId>com.helger.xsd</groupId>
              <artifactId>ph-xsds-xlink</artifactId>
            </episode>
            <episode>
              <groupId>com.helger.xsd</groupId>
              <artifactId>ph-xsds-xmldsig</artifactId>
            </episode>
            <episode>
              <groupId>com.helger.xsd</groupId>
              <artifactId>ph-xsds-xades132</artifactId>
            </episode>
            <episode>
              <groupId>com.helger.xsd</groupId>
              <artifactId>ph-xsds-xades141</artifactId>
            </episode>
            <episode>
              <groupId>com.helger.ubl</groupId>
              <artifactId>ph-ubl23</artifactId>
            </episode>
          </episodes>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.helger</groupId>
            <artifactId>ph-jaxb22-plugin</artifactId>
            <version>2.3.3.3</version>
          </dependency>
          <dependency>
            <groupId>com.helger.xsd</groupId>
            <artifactId>ph-xsds-ccts-cct-schemamodule</artifactId>
            <version>${ph-xsds.version}</version>
          </dependency>
          <dependency>
            <groupId>com.helger.ubl</groupId>
            <artifactId>ph-ubl23</artifactId>
            <version>${ph-ubl.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- Delete the directory with only ObjectFactory 
           Source: http://stackoverflow.com/questions/32635137
      -->
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <delete dir="${basedir}/target/generated-sources/xjc/com/" />
                <delete dir="${basedir}/target/generated-sources/xjc/oasis/" />
                <delete dir="${basedir}/target/generated-sources/xjc/un/" />
                <delete dir="${basedir}/target/generated-sources/t43/oasis/" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-merge-jaxb-episodes-maven-plugin</artifactId>
        <version>0.0.2</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>merge-jaxb-episodes</goal>
            </goals>
            <configuration>
              <verbose>false</verbose>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-schematron-maven-plugin</artifactId>
        <version>6.2.1</version>
        <executions>
          <execution>
            <id>edm2</id>
            <goals>
              <goal>convert</goal>
            </goals>
            <configuration>
              <schematronDirectory>src/main/resources/210</schematronDirectory>
              <xsltDirectory>src/main/resources/210</xsltDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->
    </plugins>
  </build>
</project>
