<?xml version="1.0" encoding="UTF-8"?>
<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">
  <parent>
    <artifactId>http-client-parent</artifactId>
    <groupId>org.expath.http.client</groupId>
    <version>1.4.2</version>
    <relativePath>../http-client-parent/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>http-client-saxon</artifactId>
  <name>EXPath HTTP Client Saxon Implementation</name>
  <description>Implementation of HTTP Client module for Saxon</description>
  <scm>
    <connection>scm:git:https://github.com/expath/expath-http-client-java.git</connection>
    <developerConnection>scm:git:https://github.com/expath/expath-http-client-java.git</developerConnection>
    <tag>http-client-1.4.2</tag>
    <url>scm:git:https://github.com/expath/expath-http-client-java.git</url>
  </scm>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources-filtered</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>appassembler-maven-plugin</artifactId>
        <version>2.1.0</version>
        <executions>
          <execution>
            <id>appassembler-base</id>
            <phase>package</phase>
            <goals>
              <goal>assemble</goal>
            </goals>
            <configuration>
              <assembleDirectory>${project.build.directory}/${project.artifactId}-${project.version}-dir</assembleDirectory>
              <programs>
                <program>
                  <id>transform</id>
                  <mainClass>net.sf.saxon.Transform</mainClass>
                </program>
                <program>
                  <id>query</id>
                  <mainClass>net.sf.saxon.Query</mainClass>
                </program>
              </programs>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <repositoryLayout>flat</repositoryLayout>
          <repositoryName>lib</repositoryName>
          <binFileExtensions>
            <unix>.sh</unix>
          </binFileExtensions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>copy-examples</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}-dir/examples</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.basedir}/examples</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-scripts</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}-dir/bin</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.basedir}/src/scripts</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <shadedClassifierName>uber</shadedClassifierName>
          <artifactSet>
            <excludes>
              <exclude>net.sf.saxon:Saxon-HE</exclude>
            </excludes>
          </artifactSet>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>net.sf.saxon</groupId>
      <artifactId>Saxon-HE</artifactId>
      <version>10.8</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
