<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.bidib.jbidib</groupId>
    <artifactId>jbidibc-parent</artifactId>
    <version>2.0.13</version>
    <relativePath>../jbidibc-parent/pom.xml</relativePath>
  </parent>
  <groupId>org.bidib.jbidib</groupId>
  <artifactId>jbidibc-exchange</artifactId>
  <version>2.0.13</version>
  <name>jBiDiB :: jbidibc Exchange</name>
  <description>jBiDiB jbidibc Echange POM</description>
  <licenses>
    <license>
      <name>GNU General Purpose License Version 3.0</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>org.bidib.jbidib</groupId>
      <artifactId>jbidibc-core</artifactId>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-assertj</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>${jaxb2-maven-plugin.groupId}</groupId>
        <artifactId>jaxb2-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <bindingDirectory>src/main/xjb</bindingDirectory>
              <bindingIncludes>
                <include>bindings.xjb</include>
              </bindingIncludes>
              <extension>true</extension>
              <args>
                <arg>-Xcommons-lang</arg>
                <arg>-Xfluent-api</arg>
              </args>
              <catalog>src/main/resources/catalog.cat</catalog>
              <schemas>
                <schema>
                  <fileset>
                    <directory>${project.basedir}/src/main/resources/xsd</directory>
                    <includes>
                      <include>*.xsd</include>
                    </includes>
                    <excludes>
                      <exclude>*.xs</exclude>
                    </excludes>
                  </fileset>
                </schema>
              </schemas>
              <episodes>
                <episode>
                  <groupId>org.bidib.jbidib</groupId>
                  <artifactId>jbidibc-core</artifactId>
                  <version>${jbidibc-version}</version>
                </episode>
              </episodes>
              <strict>false</strict>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includePom>true</includePom>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-resources/xml/</source>
                <source>${project.basedir}/src/main/xjb/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>format-resources</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.technicalsoftwareconfigurationmanagement.maven-plugin</groupId>
            <artifactId>tscm-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>xmlFormatter</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <includes>
                <include>**/*.xml</include>
              </includes>
              <excludes>
                <exclude>**/main/xml/bidib/**</exclude>
                <exclude>**/resources/bidib/**</exclude>
                <exclude>**/resources/xsd/**</exclude>
                <exclude>**/target/**</exclude>
                <exclude>**/test-output/**</exclude>
                <exclude>**/codestyle.xml</exclude>
                <exclude>checkstyle-config.xml</exclude>
                <exclude>**/OSGI-INF/**</exclude>
                <exclude>**/.idea/**</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
