<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  wcm.io
  %%
  Copyright (C) 2016 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.caconfig.parent</artifactId>
    <version>1.1.2</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>

  <groupId>io.wcm</groupId>
  <artifactId>io.wcm.caconfig.extensions</artifactId>
  <version>1.2.2</version>
  <packaging>bundle</packaging>

  <name>Context-Aware Configuration Extensions for AEM</name>
  <description>AEM-specific extensions for Apache Sling Context-Aware Configuration.</description>

  <scm>
    <connection>scm:git:https://github.com/wcm-io/wcm-io-caconfig.git</connection>
    <developerConnection>scm:git:https://github.com/wcm-io/wcm-io-caconfig.git</developerConnection>
    <url>https://github.com/wcm-io/wcm-io-caconfig</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <site.url.module.prefix>caconfig/extensions</site.url.module.prefix>
  </properties>

  <dependencies>
  
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.api</artifactId>
      <version>1.1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.spi</artifactId>
      <version>1.3.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.caconfig.impl</artifactId>
      <version>1.4.8</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>compile</scope>
    </dependency>

    <!-- Dependency is optional, only required for RequestHeaderConfigurationOverrideProvider -->
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.sling.commons</artifactId>
      <!-- Stick with version 0.6.4 to support both old 0.x and 1.x wcm.io versions -->
      <version>0.6.4</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.testing.wcm-io-mock.sling</artifactId>
      <version>0.6.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>
      <version>1.3.0</version>
      <scope>test</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>
            <Import-Package>
              <!-- Make dependency to io.wcm.sling.commons optional, only required for RequestHeaderConfigurationOverrideProvider -->
              io.wcm.sling.commons.*;version="[0.0,2)";resolution:=optional,
              com.day.cq.commons;version="[5.7,7)",
              *
            </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>
