<?xml version="1.0"?>
<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>

  <artifactId>basex-api</artifactId>

  <parent>
    <groupId>org.basex</groupId>
    <artifactId>basex-parent</artifactId>
    <version>13.0-SNAPSHOT</version>
    <relativePath>..</relativePath>
  </parent>

  <properties>
    <jettyVersion>12.1.10</jettyVersion>
  </properties>

  <name>BaseX API</name>

  <dependencies>
    <dependency>
      <groupId>org.basex</groupId>
      <artifactId>basex</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.xqj</groupId>
      <artifactId>basex-xqj</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xmldb</groupId>
      <artifactId>xmldb-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9</groupId>
      <artifactId>jetty-ee9-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9</groupId>
      <artifactId>jetty-ee9-servlets</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9</groupId>
      <artifactId>jetty-ee9-webapp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9.websocket</groupId>
      <artifactId>jetty-ee9-websocket-jetty-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <artifactId>jetty-websocket-jetty-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.compression</groupId>
      <artifactId>jetty-compression-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.compression</groupId>
      <artifactId>jetty-compression-gzip</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <includeScope>compile</includeScope>
          <excludeArtifactIds>xstream</excludeArtifactIds>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty.ee9</groupId>
        <artifactId>jetty-ee9-maven-plugin</artifactId>
        <version>${jettyVersion}</version>
        <configuration>
          <jettyXmls>${basedir}/src/main/webapp/WEB-INF/jetty.xml</jettyXmls>
          <stopKey>keyToStopJetty</stopKey>
          <stopPort>8081</stopPort>
          <supportedPackagings>
            <supportedPackaging>jar</supportedPackaging>
          </supportedPackagings>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
