<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~      Copyright (C) 2020  Kestros, Inc.
  ~
  ~     This program is free software: you can redistribute it and/or modify
  ~     it under the terms of the GNU General Public License as published by
  ~     the Free Software Foundation, either version 3 of the License, or
  ~     (at your option) any later version.
  ~
  ~     This program is distributed in the hope that it will be useful,
  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~     GNU General Public License for more details.
  ~
  ~     You should have received a copy of the GNU General Public License
  ~     along with this program.  If not, see <https://www.gnu.org/licenses/>.
  ~
  -->

<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>io.kestros.cms</groupId>
    <artifactId>kestros-cms-parent-strict</artifactId>
    <version>0.0.1</version>
  </parent>

  <artifactId>kestros-performance-services-api</artifactId>
  <version>0.0.2</version>

  <packaging>bundle</packaging>

  <name>Kestros Performance Services - API</name>

  <properties>
    <rootPackage>io.kestros.cms.performanceservices.api</rootPackage>
    <bundleCategory>kestros</bundleCategory>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.kestros.cms</groupId>
      <artifactId>kestros-modeltypes</artifactId>
    </dependency>

    <dependency>
      <groupId>io.kestros.cms</groupId>
      <artifactId>kestros-filetypes</artifactId>
    </dependency>

    <!-- Sling -->
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.servlets.annotations</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.scripting.sightly.compiler.java</artifactId>
    </dependency>

  </dependencies>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.13</version>
        <configuration>
          <excludes>
            <!-- don't check anything in target -->
            <exclude>target/*</exclude>
            <!-- Fixing issues with deleted modules -->
            <exclude>**/target/*</exclude>
            <exclude>**/target/**/*</exclude>
            <exclude>**/*.json</exclude>
            <exclude>node/**/*</exclude>
            <exclude>node_modules/**/*</exclude>
            <exclude>**/README.md</exclude>
            <exclude>package.json</exclude>
            <exclude>package-lock.json</exclude>
            <exclude>*-maven-settings.xml</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Export-Package>io.kestros.cms.performanceservices.api.*</Export-Package>
            <Sling-Model-Packages>io.kestros.cms.performanceservices.api</Sling-Model-Packages>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>