<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  wcm.io
  %%
  Copyright (C) 2019 wcm.io
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->

<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.wcm</groupId>
    <artifactId>io.wcm.wcm.core.components.parent</artifactId>
    <version>1.0.2-2.4.0</version>
    <relativePath>../../parent/pom.xml</relativePath>
  </parent>

  <groupId>io.wcm</groupId>
  <artifactId>io.wcm.wcm.core.components</artifactId>
  <version>1.0.2-2.4.0</version>
  <packaging>bundle</packaging>

  <name>WCM Core Components</name>
  <description>Enhances AEM Sites Core Components with wcm.io functionality.</description>
  <url>${site.url}/wcm/core-components/</url>

  <properties>
    <site.url.module.prefix>wcm/core-components/core</site.url.module.prefix>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.spi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.impl</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Core Components -->
    <dependency>
      <groupId>com.adobe.cq</groupId>
      <artifactId>core.wcm.components.core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <scope>compile</scope>
    </dependency>

    <!-- wcm.io -->
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.sling.models</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.sling.commons</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.commons</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.url</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.link</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.media</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.richtext</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.wcm.commons</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.wcm.ui.granite</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.testing.logging-mock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.testing.wcm-io-mock.sling</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.testing.wcm-io-mock.caconfig</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.testing.wcm-io-mock.handler</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>compile</scope>
    </dependency>

    <!-- For build compatibility with Java 11 -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-annotation_1.3_spec</artifactId>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>

    <plugins>

      <plugin>
        <groupId>io.wcm.devops.maven.plugins</groupId>
        <artifactId>eclipse-maven-plugin</artifactId>
        <configuration>
          <addVersionToProjectName>false</addVersionToProjectName>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Sling-Initial-Content>
              SLING-INF/app-root;overwrite:=true;ignoreImportProviders:=xml;path:=/apps/wcm-io/wcm/core
            </Sling-Initial-Content>

            <!-- For build compatibility with Java 11 -->
            <Import-Package>
              javax.annotation;version="[0.0,2)",
              *
            </Import-Package>

          </instructions>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <distributionManagement>
    <site>
      <id>${site.deploy.id}</id>
      <url>${site.deploy.url}${site.url.module.prefix}</url>
    </site>
  </distributionManagement>

</project>
