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

  <groupId>io.wcm</groupId>
  <artifactId>io.wcm.handler.url</artifactId>
  <version>1.2.2</version>
  <packaging>bundle</packaging>

  <name>URL Handler</name>
  <description>URL resolving and processing.</description>
  <url>${site.url}/${site.url.module.prefix}/</url>

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

  <properties>
    <site.url.module.prefix>handler/url</site.url.module.prefix>
  </properties>

  <dependencies>

    <dependency>
      <groupId>io.wcm</groupId>
      <artifactId>io.wcm.handler.commons</artifactId>
      <version>1.2.0</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.cocoon</groupId>
      <artifactId>cocoon-xml</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- For build compatibility with Java 11 -->
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</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/handler/url
            </Sling-Initial-Content>
            <Sling-Model-Packages>
              io.wcm.handler.url
            </Sling-Model-Packages>

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

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

    </plugins>
    <pluginManagement>
      <plugins>

        <!-- Disable checkstyle for this project due to https://github.com/checkstyle/checkstyle/issues/4589, https://github.com/checkstyle/checkstyle/issues/3236 -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>
  </build>

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

</project>
