<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.restheart</groupId>
    <artifactId>restheart-parent</artifactId>
    <version>9.4.2</version>
  </parent>

  <groupId>org.restheart</groupId>
  <artifactId>restheart-mongodb</artifactId>
  <packaging>jar</packaging>

  <name>restheart-mongodb</name>
  <description>RESTHeart MongoDB - MongoDB plugin</description>
  <url>http://www.restheart.org</url>
  <inceptionYear>2014</inceptionYear>

  <licenses>
    <license>
      <name>GNU Affero General Public License (AGPL) version 3.0</name>
      <url>http://www.gnu.org/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
      <comments>Core components license</comments>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>org.restheart</groupId>
      <artifactId>restheart-commons</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mongodb</groupId>
      <artifactId>mongodb-driver-sync</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.github.everit-org.json-schema</groupId>
      <artifactId>org.everit.json.schema</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.tika</groupId>
      <artifactId>tika-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- BEGIN Test dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.intuit.karate</groupId>
      <artifactId>karate-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- END Test dependencies -->
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
            <id>copy-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}/lib</outputDirectory>
                <includeScope>runtime</includeScope>
            </configuration>
            </execution>
        </executions>
        </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <verbose>true</verbose>
          <includes>
            <includes>**/*.java</includes>
          </includes>
        </configuration>
        <executions>
          <execution>
            <id>generate-license-headers</id>
            <goals>
              <goal>update-file-header</goal>
            </goals>
            <phase>process-sources</phase>
            <configuration>
              <licenseName>agpl_v3</licenseName>
              <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
              <emptyLineAfterHeader>true</emptyLineAfterHeader>
              <skipUpdateLicense>${skipUpdateLicense}</skipUpdateLicense>
              <processStartTag>========================LICENSE_START=================================</processStartTag>
              <processEndTag>=========================LICENSE_END==================================</processEndTag>
              <roots>
                <root>src/main/java</root>
                <root>src/test</root>
              </roots>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>